mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6: More string length checks & fixes
This commit is contained in:
commit
6e12e49b5b
7 changed files with 20 additions and 8 deletions
|
@ -83,7 +83,7 @@ msgformat_data* msgformat_data_create( void )
|
|||
int msgformat_fix_quotes(UChar **spattern, uint32_t *spattern_len, UErrorCode *ec)
|
||||
{
|
||||
if(*spattern && *spattern_len && u_strchr(*spattern, (UChar)'\'')) {
|
||||
UChar *npattern = emalloc(sizeof(UChar)*(2*(*spattern_len)+1));
|
||||
UChar *npattern = safe_emalloc(sizeof(UChar)*2, *spattern_len, sizeof(UChar));
|
||||
uint32_t npattern_len;
|
||||
npattern_len = umsg_autoQuoteApostrophe(*spattern, *spattern_len, npattern, 2*(*spattern_len)+1, ec);
|
||||
efree(*spattern);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue