diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-03-08 09:07:54 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-03-08 09:07:54 +0000 |
commit | 7bc3d71af69b04734daa32de9bbfd2f9cddfeac4 (patch) | |
tree | b6c9569c4987ba10f8425eb9c6d176ab4bded2e1 /Build/source/texk/kpathsea/xcalloc.c | |
parent | c6c24f795f2c8af90de7efd8f6438d864b4c1177 (diff) |
more robust mf.ch, xcalloc.c, and xrealloc.c
git-svn-id: svn://tug.org/texlive/trunk@17381 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/xcalloc.c')
-rw-r--r-- | Build/source/texk/kpathsea/xcalloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Build/source/texk/kpathsea/xcalloc.c b/Build/source/texk/kpathsea/xcalloc.c index e01eb9c8da4..0d01c1bcd15 100644 --- a/Build/source/texk/kpathsea/xcalloc.c +++ b/Build/source/texk/kpathsea/xcalloc.c @@ -1,6 +1,6 @@ /* xcalloc.c: calloc 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 @@ -22,7 +22,7 @@ void * xcalloc (unsigned nelem, unsigned elsize) { - void *new_mem = (void*)calloc(nelem, elsize); + void *new_mem = (void*)calloc(nelem ? nelem : 1, elsize ? elsize : 1); if (new_mem == NULL) { fprintf(stderr, |