helly           Tue Jan 24 20:59:46 2006 UTC

  Modified files:              (Branch: PHP_5_1)
    /php-src/main       snprintf.c spprintf.c 
  Log:
  - MFH Bug #35978 %n format string specifier wrongly implemented
  
http://cvs.php.net/viewcvs.cgi/php-src/main/snprintf.c?r1=1.37.2.3&r2=1.37.2.4&diff_format=u
Index: php-src/main/snprintf.c
diff -u php-src/main/snprintf.c:1.37.2.3 php-src/main/snprintf.c:1.37.2.4
--- php-src/main/snprintf.c:1.37.2.3    Sun Jan  1 12:50:17 2006
+++ php-src/main/snprintf.c     Tue Jan 24 20:59:46 2006
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: snprintf.c,v 1.37.2.3 2006/01/01 12:50:17 sniper Exp $ */
+/* $Id: snprintf.c,v 1.37.2.4 2006/01/24 20:59:46 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.25.2.1&r2=1.25.2.2&diff_format=u
Index: php-src/main/spprintf.c
diff -u php-src/main/spprintf.c:1.25.2.1 php-src/main/spprintf.c:1.25.2.2
--- php-src/main/spprintf.c:1.25.2.1    Sun Jan  1 12:50:17 2006
+++ php-src/main/spprintf.c     Tue Jan 24 20:59:46 2006
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: spprintf.c,v 1.25.2.1 2006/01/01 12:50:17 sniper Exp $ */
+/* $Id: spprintf.c,v 1.25.2.2 2006/01/24 20:59:46 helly Exp $ */
 
 /* This is the spprintf implementation.
  * It has emerged from apache snprintf. See original header:
@@ -631,7 +631,7 @@
 
                                case 'n':
                                        *(va_arg(ap, int *)) = xbuf->len;
-                                       break;
+                                       goto skip_output;
 
                                        /*
                                         * Always extract the argument as a 
"char *" pointer. We 
@@ -709,6 +709,7 @@
                        if (adjust_width && adjust == LEFT && min_width > s_len)
                                PAD(xbuf, min_width - s_len, pad_char);
                }
+skip_output:
                fmt++;
        }
        return;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to