More stack for make. Fixed buffer overrun in make.
This commit is contained in:
parent
8f9087b8d1
commit
d45066257c
@ -8,12 +8,12 @@ all: make
|
|||||||
|
|
||||||
make : $(OBJ)
|
make : $(OBJ)
|
||||||
$(CC) -i -o make $(OBJ)
|
$(CC) -i -o make $(OBJ)
|
||||||
install -S 600k make
|
install -S 2000k make
|
||||||
|
|
||||||
install: /usr/bin/make
|
install: /usr/bin/make
|
||||||
|
|
||||||
/usr/bin/make: make
|
/usr/bin/make: make
|
||||||
install -cs -o bin make $@
|
install -c -o bin make $@
|
||||||
|
|
||||||
$(OBJ): h.h
|
$(OBJ): h.h
|
||||||
|
|
||||||
|
@ -665,7 +665,7 @@ char *basename;
|
|||||||
char *inputname;
|
char *inputname;
|
||||||
{
|
{
|
||||||
register struct depend *dp;
|
register struct depend *dp;
|
||||||
|
size_t l1, l2;
|
||||||
|
|
||||||
if (dotouch)
|
if (dotouch)
|
||||||
touch(np);
|
touch(np);
|
||||||
@ -683,6 +683,10 @@ char *inputname;
|
|||||||
setDFmacro("*",basename);
|
setDFmacro("*",basename);
|
||||||
|
|
||||||
for (dp = qdp; dp; dp = qdp) {
|
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))
|
if (strlen(str1))
|
||||||
strcat(str1, " ");
|
strcat(str1, " ");
|
||||||
strcat(str1, dp->d_name->n_name);
|
strcat(str1, dp->d_name->n_name);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user