diff options
| author | Pierre Joye <pajoye@php.net> | 2011-07-28 10:52:45 +0000 |
|---|---|---|
| committer | Pierre Joye <pajoye@php.net> | 2011-07-28 10:52:45 +0000 |
| commit | 74de7dd66da294a552231715558964dc88896e01 (patch) | |
| tree | ac0868cf7597ad7a359d66bbfdb0a9732508870c /ext/standard/url_scanner_ex.c | |
| parent | 618b480d910a837c61ab554e77af45f66a8a770a (diff) | |
| download | php-git-74de7dd66da294a552231715558964dc88896e01.tar.gz | |
- Fix #55301 (url scanner part) check if malloc succeded
Diffstat (limited to 'ext/standard/url_scanner_ex.c')
| -rw-r--r-- | ext/standard/url_scanner_ex.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/standard/url_scanner_ex.c b/ext/standard/url_scanner_ex.c index f9c017ff93..d883d4dfa3 100644 --- a/ext/standard/url_scanner_ex.c +++ b/ext/standard/url_scanner_ex.c @@ -57,9 +57,12 @@ static PHP_INI_MH(OnUpdateTags) if (ctx->tags) zend_hash_destroy(ctx->tags); - else + else { ctx->tags = malloc(sizeof(HashTable)); - + if (!ctx->tags) { + return FAILURE; + } + } zend_hash_init(ctx->tags, 0, NULL, NULL, 1); for (key = php_strtok_r(tmp, ",", &lasts); |
