version 1.1.1.1, 2012/02/21 23:48:05
|
version 1.1.1.4, 2014/06/15 20:04:01
|
Line 2
|
Line 2
|
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| PHP Version 5 | |
| PHP Version 5 | |
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| Copyright (c) 1997-2012 The PHP Group | | | Copyright (c) 1997-2014 The PHP Group | |
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| This source file is subject to version 3.01 of the PHP license, | |
| This source file is subject to version 3.01 of the PHP license, | |
| that is bundled with this package in the file LICENSE, and is | |
| that is bundled with this package in the file LICENSE, and is | |
Line 123
|
Line 123
|
* NDIG = 320 |
* NDIG = 320 |
* NUM_BUF_SIZE >= strlen("-") + Emax + strlrn(".") + NDIG + strlen("E+1023") + 1; |
* NUM_BUF_SIZE >= strlen("-") + Emax + strlrn(".") + NDIG + strlen("E+1023") + 1; |
*/ |
*/ |
#define NUM_BUF_SIZE 2048 | #define NUM_BUF_SIZE 2048 |
|
|
/* |
/* |
* The INS_CHAR macro inserts a character in the buffer. |
* The INS_CHAR macro inserts a character in the buffer. |
Line 211 static void xbuf_format_converter(smart_str *xbuf, con
|
Line 211 static void xbuf_format_converter(smart_str *xbuf, con
|
|
|
double fp_num; |
double fp_num; |
wide_int i_num = (wide_int) 0; |
wide_int i_num = (wide_int) 0; |
u_wide_int ui_num; | u_wide_int ui_num = (u_wide_int) 0; |
|
|
char num_buf[NUM_BUF_SIZE]; |
char num_buf[NUM_BUF_SIZE]; |
char char_buf[2]; /* for printing %% and %<unknown> */ |
char char_buf[2]; /* for printing %% and %<unknown> */ |
Line 390 static void xbuf_format_converter(smart_str *xbuf, con
|
Line 390 static void xbuf_format_converter(smart_str *xbuf, con
|
*/ |
*/ |
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 404 static void xbuf_format_converter(smart_str *xbuf, con
|
Line 400 static void xbuf_format_converter(smart_str *xbuf, con
|
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 565 static void xbuf_format_converter(smart_str *xbuf, con
|
Line 560 static void xbuf_format_converter(smart_str *xbuf, con
|
s = ap_php_conv_p2(ui_num, 4, *fmt, |
s = ap_php_conv_p2(ui_num, 4, *fmt, |
&num_buf[NUM_BUF_SIZE], &s_len); |
&num_buf[NUM_BUF_SIZE], &s_len); |
FIX_PRECISION(adjust_precision, precision, s, s_len); |
FIX_PRECISION(adjust_precision, precision, s, s_len); |
if (alternate_form && i_num != 0) { | if (alternate_form && ui_num != 0) { |
*--s = *fmt; /* 'x' or 'X' */ |
*--s = *fmt; /* 'x' or 'X' */ |
*--s = '0'; |
*--s = '0'; |
s_len += 2; |
s_len += 2; |
Line 705 static void xbuf_format_converter(smart_str *xbuf, con
|
Line 700 static void xbuf_format_converter(smart_str *xbuf, con
|
|
|
|
|
case 'n': |
case 'n': |
#if SUHOSIN_PATCH |
|
zend_suhosin_log(S_MISC, "'n' specifier within format string"); |
|
#else |
|
*(va_arg(ap, int *)) = xbuf->len; |
*(va_arg(ap, int *)) = xbuf->len; |
#endif |
|
goto skip_output; |
goto skip_output; |
|
|
/* |
/* |