From: Ilia Alshanetsky Date: Mon, 8 Aug 2011 12:10:27 +0000 (+0000) Subject: Make static analyzers happy X-Git-Tag: php-5.3.7RC5~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=92d68c62af297e1cf50b8b720f988e79224b3c4b;p=php Make static analyzers happy --- diff --git a/ext/standard/head.c b/ext/standard/head.c index edaf767463..5ddc304adc 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);