mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
fix conditions
substraction from an unsigned
This commit is contained in:
parent
65100a6474
commit
ea4ab02446
1 changed files with 2 additions and 2 deletions
|
@ -524,7 +524,7 @@ size_t php_mysqlnd_auth_write(void * _packet, MYSQLND_CONN_DATA * conn TSRMLS_DC
|
||||||
int1store(p, packet->auth_data_len);
|
int1store(p, packet->auth_data_len);
|
||||||
++p;
|
++p;
|
||||||
/*!!!!! is the buffer big enough ??? */
|
/*!!!!! is the buffer big enough ??? */
|
||||||
if ((sizeof(buffer) - (p - buffer)) < packet->auth_data_len) {
|
if (sizeof(buffer) < (packet->auth_data_len + (p - buffer))) {
|
||||||
DBG_ERR("the stack buffer was not enough!!");
|
DBG_ERR("the stack buffer was not enough!!");
|
||||||
DBG_RETURN(0);
|
DBG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
@ -596,7 +596,7 @@ size_t php_mysqlnd_auth_write(void * _packet, MYSQLND_CONN_DATA * conn TSRMLS_DC
|
||||||
} ZEND_HASH_FOREACH_END();
|
} ZEND_HASH_FOREACH_END();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if ((sizeof(buffer) - (p - buffer)) >= (ca_payload_len + php_mysqlnd_net_store_length_size(ca_payload_len))) {
|
if (sizeof(buffer) >= (ca_payload_len + php_mysqlnd_net_store_length_size(ca_payload_len) + (p - buffer))) {
|
||||||
p = php_mysqlnd_net_store_length(p, ca_payload_len);
|
p = php_mysqlnd_net_store_length(p, ca_payload_len);
|
||||||
|
|
||||||
#ifdef OLD_CODE
|
#ifdef OLD_CODE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue