cvs: php-src /main snprintf.c spprintf.c
| From: | Marcus Boerger | Date: | Tue, 24 Jan 2006 20:57:56 +0000 |
| Subject: | cvs: php-src /main snprintf.c spprintf.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-36612@lists.php.net to get a copy of this message | ||
helly Tue Jan 24 20:57:56 2006 UTC
Modified files:
/php-src/main snprintf.c spprintf.c
Log:
- Fixed Bug #35978 %n format string specifier wrongly implemented
http://cvs.php.net/viewcvs.cgi/php-src/main/snprintf.c?r1=1.41&r2=1.42&diff_format=u
Index: php-src/main/snprintf.c
diff -u php-src/main/snprintf.c:1.41 php-src/main/snprintf.c:1.42
--- php-src/main/snprintf.c:1.41 Sun Jan 1 13:09:57 2006
+++ php-src/main/snprintf.c Tue Jan 24 20:57:56 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: snprintf.c,v 1.41 2006/01/01 13:09:57 sniper Exp $ */
+/* $Id: snprintf.c,v 1.42 2006/01/24 20:57:56 helly Exp $ */
/* ====================================================================
* Copyright (c) 1995-1998 The Apache Group. All rights reserved.
@@ -1015,7 +1015,7 @@
case 'n':
*(va_arg(ap, int *)) = cc;
- break;
+ goto skip_output;
/*
* Always extract the argument as a "char *" pointer. We
@@ -1096,6 +1096,7 @@
if (adjust_width && adjust == LEFT && min_width > s_len)
PAD(min_width, s_len, pad_char);
}
+skip_output:
fmt++;
}
odp->nextb = sp;
http://cvs.php.net/viewcvs.cgi/php-src/main/spprintf.c?r1=1.34&r2=1.35&diff_format=u
Index: php-src/main/spprintf.c
diff -u php-src/main/spprintf.c:1.34 php-src/main/spprintf.c:1.35
--- php-src/main/spprintf.c:1.34 Sun Jan 1 13:09:57 2006
+++ php-src/main/spprintf.c Tue Jan 24 20:57:56 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spprintf.c,v 1.34 2006/01/01 13:09:57 sniper Exp $ */
+/* $Id: spprintf.c,v 1.35 2006/01/24 20:57:56 helly Exp $ */
/* This is the spprintf implementation.
* It has emerged from apache snprintf. See original header:
@@ -722,7 +722,7 @@
case 'n':
*(va_arg(ap, int *)) = xbuf->len;
- break;
+ goto skip_output;
/*
* Always extract the argument as a "char *" pointer. We
@@ -802,6 +802,7 @@
PAD(unicode, xbuf, min_width - s_len, pad_char);
}
}
+skip_output:
fmt++;
}
return;