1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 06:51:18 +02:00

Free RSA public key in mysqlnd sha256 auth

Not sure why this only started showing up as a leak now.
This commit is contained in:
Nikita Popov
2019-12-11 10:30:19 +01:00
parent 3280209c03
commit b6a59cee47

View File

@@ -810,6 +810,7 @@ mysqlnd_sha256_auth_get_auth_data(struct st_mysqlnd_authentication_plugin * self
*auth_data_len = server_public_key_len;
ret = malloc(*auth_data_len);
RSA_public_encrypt(passwd_len + 1, (zend_uchar *) xor_str, ret, server_public_key, RSA_PKCS1_OAEP_PADDING);
RSA_free(server_public_key);
}
}