mirror of
https://github.com/php/php-src.git
synced 2025-01-10 13:03:54 +08:00
never smash the stack...
This commit is contained in:
parent
5619a3d0a5
commit
a8191a66c1
@ -3535,6 +3535,7 @@ mbfl_filt_conv_html_enc(int c, mbfl_convert_filter *filter TSRMLS_DC)
|
||||
{
|
||||
int tmp[10];
|
||||
int i = 0, p = 0, e;
|
||||
unsigned int uc;
|
||||
|
||||
if (c<256 && mblen_table_html[c]==1) {
|
||||
CK((*filter->output_function)(c, filter->data TSRMLS_CC));
|
||||
@ -3554,15 +3555,17 @@ mbfl_filt_conv_html_enc(int c, mbfl_convert_filter *filter TSRMLS_DC)
|
||||
}
|
||||
i++;
|
||||
}
|
||||
i=0;
|
||||
if (!p) {
|
||||
CK((*filter->output_function)('#', filter->data TSRMLS_CC));
|
||||
uc = (unsigned int)c;
|
||||
do {
|
||||
tmp[i++] = '0'+c%10;
|
||||
c /= 10;
|
||||
} while (c);
|
||||
tmp[i++] = '0'+uc%10;
|
||||
uc /= 10;
|
||||
} while (uc);
|
||||
do {
|
||||
CK((*filter->output_function)(tmp[--i], filter->data TSRMLS_CC));
|
||||
} while(i);
|
||||
} while (i);
|
||||
}
|
||||
CK((*filter->output_function)(';', filter->data TSRMLS_CC));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user