iliaa Mon, 08 Aug 2011 12:10:27 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=314486
Log:
Make static analyzers happy
Changed paths:
U php/php-src/branches/PHP_5_3/ext/standard/head.c
U php/php-src/branches/PHP_5_4/ext/standard/head.c
U php/php-src/trunk/ext/standard/head.c
Modified: php/php-src/branches/PHP_5_3/ext/standard/head.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/head.c 2011-08-08 12:05:34 UTC
(rev 314485)
+++ php/php-src/branches/PHP_5_3/ext/standard/head.c 2011-08-08 12:10:27 UTC
(rev 314486)
@@ -128,7 +128,7 @@
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);
Modified: php/php-src/branches/PHP_5_4/ext/standard/head.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/standard/head.c 2011-08-08 12:05:34 UTC
(rev 314485)
+++ php/php-src/branches/PHP_5_4/ext/standard/head.c 2011-08-08 12:10:27 UTC
(rev 314486)
@@ -127,7 +127,7 @@
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);
Modified: php/php-src/trunk/ext/standard/head.c
===================================================================
--- php/php-src/trunk/ext/standard/head.c 2011-08-08 12:05:34 UTC (rev
314485)
+++ php/php-src/trunk/ext/standard/head.c 2011-08-08 12:10:27 UTC (rev
314486)
@@ -127,7 +127,7 @@
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);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php