projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57bf668
)
awk: don't segfault on printf(%*s). Close 1337.
author
Denis Vlasenko
<vda.linux@googlemail.com>
Wed, 9 May 2007 21:57:23 +0000
(21:57 -0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Wed, 9 May 2007 21:57:23 +0000
(21:57 -0000)
editors/awk.c
patch
|
blob
|
history
diff --git
a/editors/awk.c
b/editors/awk.c
index bc9e99a6f555982e30bd08bfe43f017355c9a1fc..2e67f67fb71880b842081c3c2dfaccbf650036c6 100644
(file)
--- a/
editors/awk.c
+++ b/
editors/awk.c
@@
-1756,8
+1756,11
@@
static char *awk_printf(node *n)
s = f;
while (*f && (*f != '%' || *(++f) == '%'))
f++;
- while (*f && !isalpha(*f))
+ while (*f && !isalpha(*f)) {
+ if (*f == '*')
+ syntax_error("%*x formats are not supported");
f++;
+ }
incr = (f - s) + MAXVARFMT;
qrealloc(&b, incr + i, &bsize);