git: 9front

Download patch

ref: b1fa1a51a2d426ebf0a9ccfc85ed13873b128aec
parent: d1cecf877f138fbf3bb1a052d276bb0cd5965a72
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Fri Aug 10 06:06:23 EDT 2012

acid: fix cvtitoa buffer overflow

--- a/sys/src/cmd/acid/builtin.c
+++ b/sys/src/cmd/acid/builtin.c
@@ -754,7 +754,7 @@
 		expr(av[1], &res);
 		if(res.type != TSTRING)
 			error("itoa(number [, fmt]): fmt type");
-		if(acidfmt(res.string->string, fmt, sizeof(buf)))
+		if(acidfmt(res.string->string, fmt, sizeof(fmt)))
 			error("itoa(number [, fmt]): malformed fmt");
 	}
 
--