summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2011-08-08 12:10:27 (GMT)
committerIlia Alshanetsky <iliaa@php.net>2011-08-08 12:10:27 (GMT)
commit92d68c62af297e1cf50b8b720f988e79224b3c4b (patch)
treea3b4b1e94a348cec7a6a3e0460e4d8a23a888fe1 /ext
parent19b6735d860093f21ef5842a81bdcb02e253398c (diff)
downloadphp-92d68c62af297e1cf50b8b720f988e79224b3c4b.tar.gz
Make static analyzers happy
Diffstat (limited to 'ext')
-rw-r--r--ext/standard/head.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/head.c b/ext/standard/head.c
index edaf767..5ddc304 100644
--- a/ext/standard/head.c
+++ b/ext/standard/head.c
@@ -128,7 +128,7 @@ PHPAPI int php_setcookie(char *name, int name_len, char *value, int value_len, t
dt = php_format_date("D, d-M-Y H:i:s T", sizeof("D, d-M-Y H:i:s T")-1, expires, 0 TSRMLS_CC);
/* check to make sure that the year does not exceed 4 digits in length */
p = zend_memrchr(dt, '-', strlen(dt));
- if (*(p + 5) != ' ') {
+ if (!p || *(p + 5) != ' ') {
efree(dt);
efree(cookie);
efree(encoded_value);