com php-src: Fix type of string length in zpp call: ext/standard/head.c

From: Date: Tue, 02 Dec 2014 06:06:10 +0000
Subject: com php-src: Fix type of string length in zpp call: ext/standard/head.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-83466@lists.php.net to get a copy of this message
Commit: 67fc5d6bbb9bd07512d7e0a6866388287a7f9223 Author: Remi Collet <remi@php.net> Tue, 2 Dec 2014 07:05:13 +0100 Parents: 6ae09ddf4993a5ae362461c05e84076e0e66639d Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=67fc5d6bbb9bd07512d7e0a6866388287a7f9223 Log: Fix type of string length in zpp call Fix 23 failed tests (detected on bigendian) Changed paths: M ext/standard/head.c Diff: diff --git a/ext/standard/head.c b/ext/standard/head.c index 1417b52..28fcb6b 100644 --- a/ext/standard/head.c +++ b/ext/standard/head.c @@ -40,11 +40,13 @@ PHP_FUNCTION(header) { zend_bool rep = 1; sapi_header_line ctr = {0}; + size_t len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|bl", &ctr.line, - &ctr.line_len, &rep, &ctr.response_code) == FAILURE) + &len, &rep, &ctr.response_code) == FAILURE) return; + ctr.line_len = (uint)len; sapi_header_op(rep ? SAPI_HEADER_REPLACE:SAPI_HEADER_ADD, &ctr TSRMLS_CC); } /* }}} */ @@ -54,11 +56,13 @@ PHP_FUNCTION(header) PHP_FUNCTION(header_remove) { sapi_header_line ctr = {0}; + size_t len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &ctr.line, - &ctr.line_len) == FAILURE) + &len) == FAILURE) return; + ctr.line_len = (uint)len; sapi_header_op(ZEND_NUM_ARGS() == 0 ? SAPI_HEADER_DELETE_ALL : SAPI_HEADER_DELETE, &ctr TSRMLS_CC); } /* }}} */

« previous php.cvs (#83466) next »