From: Philip Homburg Date: Thu, 18 Aug 2005 11:36:36 +0000 (+0000) Subject: More stack for make. Fixed buffer overrun in make. X-Git-Tag: v3.1.0~324 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/man.dnssec-coverage.html?a=commitdiff_plain;h=d45066257cc9df6aa61eb1d71cd56cf4ae76af53;p=minix.git More stack for make. Fixed buffer overrun in make. --- diff --git a/commands/make/Makefile b/commands/make/Makefile index c6c423c68..1bcd5b14c 100755 --- a/commands/make/Makefile +++ b/commands/make/Makefile @@ -8,12 +8,12 @@ all: make make : $(OBJ) $(CC) -i -o make $(OBJ) - install -S 600k make + install -S 2000k make install: /usr/bin/make /usr/bin/make: make - install -cs -o bin make $@ + install -c -o bin make $@ $(OBJ): h.h diff --git a/commands/make/make.c b/commands/make/make.c index 4ef28ca82..6be6c1d3c 100755 --- a/commands/make/make.c +++ b/commands/make/make.c @@ -665,7 +665,7 @@ char *basename; char *inputname; { register struct depend *dp; - + size_t l1, l2; if (dotouch) touch(np); @@ -683,6 +683,10 @@ char *inputname; setDFmacro("*",basename); for (dp = qdp; dp; dp = qdp) { + l1= strlen(str1); + l2= strlen(dp->d_name->n_name); + while (l1 + 1 + l2 +1 > str1s.len) + strrealloc(&str1s); if (strlen(str1)) strcat(str1, " "); strcat(str1, dp->d_name->n_name);