From 0840162b4cbdc0e0a5d28580b4e6d4a8fbdc3fee Mon Sep 17 00:00:00 2001 From: root Date: Fri, 16 Feb 1996 17:37:53 +0000 Subject: [PATCH] don't allocate 0 bytes! CVS patchset: 300 CVS date: 1996/02/16 17:37:53 --- build/pack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/pack.c b/build/pack.c index bf9010b..70967a7 100644 --- a/build/pack.c +++ b/build/pack.c @@ -834,8 +834,8 @@ int packageSource(Spec s) filelist = newStringBuf(); - sources = malloc(s->numSources * sizeof(char *)); - patches = malloc(s->numPatches * sizeof(char *)); + sources = malloc((s->numSources+1) * sizeof(char *)); + patches = malloc((s->numPatches+1) * sizeof(char *)); /* Link in the spec file and all the sources */ sprintf(dest, "%s%s", tempdir, strrchr(s->specfile, '/')); -- 2.7.4