projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
add simple (de)quote and (de)escape capabilities to http\Params
[m6w6/ext-http]
/
php_http_misc.c
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;
{
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);
if (flags & PHP_HTTP_MATCH_FULL) {
if (flags & PHP_HTTP_MATCH_CASE) {
result = !strcmp(haystack_str, needle_str);