mirror of
https://github.com/php/php-src.git
synced 2024-11-24 18:34:21 +08:00
Add explicit cast to uint32_t.
It works even without it but explicit stuff is better. The compiler probably converts the 16-bit uint16_t to uint32_t before doing the shift.
This commit is contained in:
parent
99f3e0f0ed
commit
102c64e827
@ -392,6 +392,7 @@ php_mysqlnd_greet_read(void * _packet)
|
||||
packet->server_capabilities = uint2korr(p);
|
||||
p+= 2;
|
||||
BAIL_IF_NO_MORE_DATA;
|
||||
DBG_INF_FMT("4.1 server_caps=%u\n", (uint32_t) packet->server_capabilities);
|
||||
|
||||
packet->charset_no = uint1korr(p);
|
||||
p++;
|
||||
@ -421,7 +422,8 @@ php_mysqlnd_greet_read(void * _packet)
|
||||
p--;
|
||||
|
||||
/* Additional 16 bits for server capabilities */
|
||||
packet->server_capabilities |= uint2korr(pad_start) << 16;
|
||||
DBG_INF_FMT("additional 5.5+ caps=%u\n", (uint32_t) uint2korr(pad_start));
|
||||
packet->server_capabilities |= ((uint32_t) uint2korr(pad_start)) << 16;
|
||||
/* And a length of the server scramble in one byte */
|
||||
packet->authentication_plugin_data.l = uint1korr(pad_start + 2);
|
||||
if (packet->authentication_plugin_data.l > SCRAMBLE_LENGTH) {
|
||||
|
Loading…
Reference in New Issue
Block a user