[hackers] [sbase] Handle empty format string in printf(1) || FRIGN
commit c691dd4e2f206aeb3ee6db30a7a8ae1930db1562
Author: FRIGN <dev_AT_frign.de>
Date: Sun Feb 15 15:20:32 2015 +0100
Handle empty format string in printf(1)
diff --git a/printf.c b/printf.c
index bfd8670..ec5d441 100644
--- a/printf.c
+++ b/printf.c
_AT_@ -32,7 +32,8 @@ int main(int argc, char *argv[])
cooldown = 1;
}
formatlen = unescape(format);
-
+ if (formatlen == 0)
+ return 0;
lastargi = 0;
for (i = 0, argi = 2; !cooldown || i < formatlen; i++, i = cooldown ? i : (i % formatlen)) {
if (i == 0) {
Received on Sun Feb 15 2015 - 17:04:48 CET
This archive was generated by hypermail 2.3.0
: Sun Feb 15 2015 - 17:12:11 CET