From: Andrey Hristov Date: Tue, 5 Oct 2010 11:08:21 +0000 (+0000) Subject: add some safe casts X-Git-Tag: php-5.4.0alpha1~191^2~830 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a9da84800e4d0628b149944eb403c348d6f87c9f;p=php add some safe casts --- diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c index ffec3d68ec..c044927994 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.c +++ b/ext/mysqlnd/mysqlnd_wireprotocol.c @@ -1392,7 +1392,7 @@ php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval #else _atoi64((char *) p); #endif - ZVAL_LONG(*current_field, v); + ZVAL_LONG(*current_field, (long) v); /* the cast is safe */ } else { uint64_t v = #ifndef PHP_WIN32 @@ -1414,7 +1414,7 @@ php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval { ZVAL_STRINGL(*current_field, (char *)p, len, 0); } else { - ZVAL_LONG(*current_field, (int64_t)v); + ZVAL_LONG(*current_field, (long) v); /* the cast is safe */ } } *(p + len) = save;