X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fanno.c;h=96b896c43bffd5c4de7e5e25a50d028a397dddf4;hp=1c97179160c388f3ed3a129c67151edbed76d88d;hb=10eff860a28b96582526eb739fd0a55441669938;hpb=d6742b1bb19c7eca8488402484a6e4f55543d789 diff --git a/uip/anno.c b/uip/anno.c index 1c97179..96b896c 100644 --- a/uip/anno.c +++ b/uip/anno.c @@ -305,7 +305,7 @@ annolist(char *file, unsigned char *comp, int number) } /* We'll grow this buffer as needed. */ - field = (char *)mh_xmalloc(field_size = 256); + field = (char *)mh_xcalloc(field_size = 256, sizeof(char)); make_comp(&comp); length = strlen(comp); /* Convenience copy. */ @@ -459,7 +459,7 @@ dodel(int fd, unsigned char *comp, char *text, FILE *tmp, int number) if ((fp = fdopen(fd, "r")) == NULL) { adios(EX_IOERR, NULL, "unable to fdopen file."); } - field = (char *)mh_xmalloc(field_size); + field = (char *)mh_xcalloc(field_size, sizeof(char)); /* ** Copy lines from the input file to the temporary file