mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-03-31 17:51:11 +02:00
Add mac not NULL check before calling memset
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
This commit is contained in:
@@ -2687,7 +2687,7 @@ exit:
|
||||
operation->mac_size = 0;
|
||||
}
|
||||
|
||||
if (mac_size > operation->mac_size) {
|
||||
if ((mac != NULL) && (mac_size > operation->mac_size)) {
|
||||
memset(&mac[operation->mac_size], '!',
|
||||
mac_size - operation->mac_size);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user