diff options
author | Anatol Belski <ab@php.net> | 2014-10-10 22:51:13 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-10-10 22:51:13 +0200 |
commit | e1cd0e0a38deb91d24ded68df010b7f6c03d2cb6 (patch) | |
tree | 19090152884f17ee4d7691ee79462f4a0537d356 /sapi/cli | |
parent | fe42847799c9fab9476ca6399e25ed0da0cb2d5c (diff) | |
parent | e33e4b2d8c44fb04afc54f688ed44dce7e8a2e0f (diff) | |
download | php-git-e1cd0e0a38deb91d24ded68df010b7f6c03d2cb6.tar.gz |
Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (40 commits)
int to size_t where the underlaying API supports it
use php_socket_t instead of int
fix signed/unsigned mismatch warning
fix compilation warning
Improved specialisation $this variable accessed through IS_UNUSED operand must be IS_OBJECT, so we don't have to check for its type or perform dereference.
Add notes about get_class_entry/get_class_name to UPGRADING
Fix casts in GD
Drop redundant casting code from ext/filter
update NEWS
update NEWS
update NEWS
update NEWS
Added note to UPGRADING regarding 64-bit support in pack()/unpack()
pack(): Use SIZEOF_ZEND_LONG instead of SIZEOF_LONG
Add 64 bit formats to pack() and unpack()
Help to CPU branch predictor
Removed unused EG(orig_error_reporting)
Update get_class_name semantics
Remove Z_OBJ_CLASS_NAME_P
Improved VM stack primitives for fast paths. Slow paths are not inlined anymore.
...
Diffstat (limited to 'sapi/cli')
-rw-r--r-- | sapi/cli/php_http_parser.c | 7 | ||||
-rw-r--r-- | sapi/cli/ps_title.c | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/sapi/cli/php_http_parser.c b/sapi/cli/php_http_parser.c index d3bc496f4e..cc649af79a 100644 --- a/sapi/cli/php_http_parser.c +++ b/sapi/cli/php_http_parser.c @@ -1431,7 +1431,9 @@ size_t php_http_parser_execute (php_http_parser *parser, } case s_body_identity: - to_read = MIN(pe - p, (size_t)parser->content_length); + assert(pe >= p); + + to_read = MIN((size_t)(pe - p), (size_t)parser->content_length); if (to_read > 0) { if (settings->on_body) settings->on_body(parser, p, to_read); p += to_read - 1; @@ -1515,8 +1517,9 @@ size_t php_http_parser_execute (php_http_parser *parser, case s_chunk_data: { assert(parser->flags & F_CHUNKED); + assert(pe >= p); - to_read = MIN(pe - p, (size_t)(parser->content_length)); + to_read = MIN((size_t)(pe - p), (size_t)(parser->content_length)); if (to_read > 0) { if (settings->on_body) settings->on_body(parser, p, to_read); diff --git a/sapi/cli/ps_title.c b/sapi/cli/ps_title.c index 0be94e3eb0..97eec86e5b 100644 --- a/sapi/cli/ps_title.c +++ b/sapi/cli/ps_title.c @@ -386,7 +386,7 @@ int get_ps_title(int *displen, const char** string) return rc; #ifdef PS_USE_WIN32 - if (!(ps_buffer_cur_len = GetConsoleTitle(ps_buffer, ps_buffer_size))) + if (!(ps_buffer_cur_len = GetConsoleTitle(ps_buffer, (DWORD)ps_buffer_size))) return PS_TITLE_WINDOWS_ERROR; #endif *displen = (int)ps_buffer_cur_len; |