summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea/xrealloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/kpathsea/xrealloc.c')
-rw-r--r--Build/source/texk/kpathsea/xrealloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Build/source/texk/kpathsea/xrealloc.c b/Build/source/texk/kpathsea/xrealloc.c
index 0bafda049c7..516ad4463ec 100644
--- a/Build/source/texk/kpathsea/xrealloc.c
+++ b/Build/source/texk/kpathsea/xrealloc.c
@@ -1,6 +1,6 @@
/* xrealloc.c: realloc with error checking.
- Copyright 1992, 1993, 2008 Karl Berry.
+ Copyright 1992, 1993, 2008, 2010 Karl Berry.
Copyright 2005 Olaf Weber.
This library is free software; you can redistribute it and/or
@@ -28,7 +28,7 @@ xrealloc (void *old_ptr, unsigned size)
if (old_ptr == NULL) {
new_mem = xmalloc(size);
} else {
- new_mem = (void *)realloc(old_ptr, size);
+ new_mem = (void *)realloc(old_ptr, size ? size : 1);
if (new_mem == NULL) {
/* We used to print OLD_PTR here using %x, and casting its
value to unsigned, but that lost on the Alpha, where