Diff for /embedaddon/php/main/snprintf.c between versions 1.1.1.1 and 1.1.1.2

version 1.1.1.1, 2012/02/21 23:48:05 version 1.1.1.2, 2012/05/29 12:34:35
Line 18 Line 18
   
 /* $Id$ */  /* $Id$ */
   
#define _GNU_SOURCE
 #include "php.h"  #include "php.h"
   
 #include <zend_strtod.h>  #include <zend_strtod.h>
Line 782  static int format_converter(register buffy * odp, cons Line 782  static int format_converter(register buffy * odp, cons
                          */                           */
                         switch (*fmt) {                          switch (*fmt) {
                                 case 'Z':                                  case 'Z':
 #if SUHOSIN_PATCH  
                                         zend_suhosin_log(S_MISC, "'Z' specifier within format string");  
                                         goto skip_output;  
 #else  
                                         zvp = (zval*) va_arg(ap, zval*);                                          zvp = (zval*) va_arg(ap, zval*);
                                         zend_make_printable_zval(zvp, &zcopy, &free_zcopy);                                          zend_make_printable_zval(zvp, &zcopy, &free_zcopy);
                                         if (free_zcopy) {                                          if (free_zcopy) {
Line 796  static int format_converter(register buffy * odp, cons Line 792  static int format_converter(register buffy * odp, cons
                                         if (adjust_precision && precision < s_len) {                                          if (adjust_precision && precision < s_len) {
                                                 s_len = precision;                                                  s_len = precision;
                                         }                                          }
 #endif  
                                         break;                                          break;
                                 case 'u':                                  case 'u':
                                         switch(modifier) {                                          switch(modifier) {
Line 1098  static int format_converter(register buffy * odp, cons Line 1093  static int format_converter(register buffy * odp, cons
   
   
                                 case 'n':                                  case 'n':
 #if SUHOSIN_PATCH  
                                         zend_suhosin_log(S_MISC, "'n' specifier within format string");  
 #else  
                                         *(va_arg(ap, int *)) = cc;                                          *(va_arg(ap, int *)) = cc;
 #endif  
                                         goto skip_output;                                          goto skip_output;
   
                                         /*                                          /*
Line 1231  static void strx_printv(int *ccp, char *buf, size_t le Line 1222  static void strx_printv(int *ccp, char *buf, size_t le
   
 PHPAPI int ap_php_slprintf(char *buf, size_t len, const char *format,...) /* {{{ */  PHPAPI int ap_php_slprintf(char *buf, size_t len, const char *format,...) /* {{{ */
 {  {
        int cc;        unsigned int cc;
         va_list ap;          va_list ap;
   
         va_start(ap, format);          va_start(ap, format);
Line 1247  PHPAPI int ap_php_slprintf(char *buf, size_t len, cons Line 1238  PHPAPI int ap_php_slprintf(char *buf, size_t len, cons
   
 PHPAPI int ap_php_vslprintf(char *buf, size_t len, const char *format, va_list ap) /* {{{ */  PHPAPI int ap_php_vslprintf(char *buf, size_t len, const char *format, va_list ap) /* {{{ */
 {  {
        int cc;        unsigned int cc;
   
         strx_printv(&cc, buf, len, format, ap);          strx_printv(&cc, buf, len, format, ap);
         if (cc >= len) {          if (cc >= len) {

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>