projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
| inline |
side by side
(parent:
b8d2318
)
catch NULLs
author
Michael Wallner
<mike@php.net>
Mon, 13 Feb 2012 13:30:26 +0000
(13:30 +0000)
committer
Michael Wallner
<mike@php.net>
Mon, 13 Feb 2012 13:30:26 +0000
(13:30 +0000)
php_http_misc.c
patch
|
blob
|
history
diff --git
a/php_http_misc.c
b/php_http_misc.c
index 2860caa39a0704e65ca5093d3772bbaeee2dc21d..e4411e0aaf39efb2e654e46913d8287ec0beb001 100644
(file)
--- a/
php_http_misc.c
+++ b/
php_http_misc.c
@@
-50,6
+50,10
@@
int php_http_match(const char *haystack_str, const char *needle_str, int flags)
{
int result = 0;
+ if (!haystack_str || !needle_str) {
+ return result;
+ }
+
if (flags & PHP_HTTP_MATCH_FULL) {
if (flags & PHP_HTTP_MATCH_CASE) {
result = !strcmp(haystack_str, needle_str);