diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2011-08-08 12:10:27 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2011-08-08 12:10:27 +0000 |
| commit | 9c834bd51c5ddaec33cb5a83e733fbd70bfee99d (patch) | |
| tree | b480e04d702bf6f7f437db0083bac046c77a5acb | |
| parent | 482e4b9d703d7b4dba99b70ae9965faa0f727d58 (diff) | |
| download | php-git-9c834bd51c5ddaec33cb5a83e733fbd70bfee99d.tar.gz | |
Make static analyzers happy
| -rw-r--r-- | ext/standard/head.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/head.c b/ext/standard/head.c index ec5ed95657..05f5fb4e5a 100644 --- a/ext/standard/head.c +++ b/ext/standard/head.c @@ -127,7 +127,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); |
