mirror of
https://github.com/sheumann/hush.git
synced 2025-02-05 21:30:50 +00:00
awk: don't segfault on printf(%*s). Close 1337.
This commit is contained in:
parent
57bf668d11
commit
389f9d52d5
@ -1756,8 +1756,11 @@ static char *awk_printf(node *n)
|
|||||||
s = f;
|
s = f;
|
||||||
while (*f && (*f != '%' || *(++f) == '%'))
|
while (*f && (*f != '%' || *(++f) == '%'))
|
||||||
f++;
|
f++;
|
||||||
while (*f && !isalpha(*f))
|
while (*f && !isalpha(*f)) {
|
||||||
|
if (*f == '*')
|
||||||
|
syntax_error("%*x formats are not supported");
|
||||||
f++;
|
f++;
|
||||||
|
}
|
||||||
|
|
||||||
incr = (f - s) + MAXVARFMT;
|
incr = (f - s) + MAXVARFMT;
|
||||||
qrealloc(&b, incr + i, &bsize);
|
qrealloc(&b, incr + i, &bsize);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user