Skip to content

Commit 4122a1d

Browse files
author
Ilia Alshanetsky
committed
Make static analyzers happy
1 parent e17b5f7 commit 4122a1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/standard/head.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ PHPAPI int php_setcookie(char *name, int name_len, char *value, int value_len, t
127127
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);
128128
/* check to make sure that the year does not exceed 4 digits in length */
129129
p = zend_memrchr(dt, '-', strlen(dt));
130-
if (*(p + 5) != ' ') {
130+
if (!p || *(p + 5) != ' ') {
131131
efree(dt);
132132
efree(cookie);
133133
efree(encoded_value);

0 commit comments

Comments
 (0)