svn commit: trunk/busybox/editors

vda at busybox.net vda at busybox.net
Wed May 9 14:57:24 PDT 2007


Author: vda
Date: 2007-05-09 14:57:23 -0700 (Wed, 09 May 2007)
New Revision: 18596

Log:
awk: don't segfault on printf(%*s). Close 1337.



Modified:
   trunk/busybox/editors/awk.c


Changeset:
Modified: trunk/busybox/editors/awk.c
===================================================================
--- trunk/busybox/editors/awk.c	2007-05-09 21:27:15 UTC (rev 18595)
+++ trunk/busybox/editors/awk.c	2007-05-09 21:57:23 UTC (rev 18596)
@@ -1756,8 +1756,11 @@
 		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);



More information about the busybox-cvs mailing list