Module Name: src
Committed By: christos
Date: Thu Dec 17 15:19:49 UTC 2009
Modified Files:
src/lib/libc/stdio: vsnprintf_ss.c
Log Message:
PR/42466: Yasuoka Masahiko: vsnprintf_ss() causes infinite loop
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/lib/libc/stdio/vsnprintf_ss.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/stdio/vsnprintf_ss.c
diff -u src/lib/libc/stdio/vsnprintf_ss.c:1.8 src/lib/libc/stdio/vsnprintf_ss.c:1.9
--- src/lib/libc/stdio/vsnprintf_ss.c:1.8 Sun Oct 25 16:44:13 2009
+++ src/lib/libc/stdio/vsnprintf_ss.c Thu Dec 17 10:19:48 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: vsnprintf_ss.c,v 1.8 2009/10/25 20:44:13 christos Exp $ */
+/* $NetBSD: vsnprintf_ss.c,v 1.9 2009/12/17 15:19:48 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)vsnprintf.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: vsnprintf_ss.c,v 1.8 2009/10/25 20:44:13 christos Exp $");
+__RCSID("$NetBSD: vsnprintf_ss.c,v 1.9 2009/12/17 15:19:48 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -164,7 +164,8 @@
for (;;) {
while (*fmt != '%' && *fmt) {
ret++;
- PUTCHAR(*fmt++);
+ PUTCHAR(*fmt);
+ fmt++;
}
if (*fmt == 0)
goto done;