mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-31 04:43:06 +02:00
ghmac: Use new g_alloca0() function
Replace `g_alloca()` and `memset()` with `g_alloca0()`
This commit is contained in:
parent
1c7936b368
commit
8bf62d6309
@ -127,11 +127,9 @@ g_hmac_new (GChecksumType digest_type,
|
|||||||
hmac->digesti = checksum;
|
hmac->digesti = checksum;
|
||||||
hmac->digesto = g_checksum_new (digest_type);
|
hmac->digesto = g_checksum_new (digest_type);
|
||||||
|
|
||||||
buffer = g_alloca (block_size);
|
buffer = g_alloca0 (block_size);
|
||||||
pad = g_alloca (block_size);
|
pad = g_alloca (block_size);
|
||||||
|
|
||||||
memset (buffer, 0, block_size);
|
|
||||||
|
|
||||||
/* If the key is too long, hash it */
|
/* If the key is too long, hash it */
|
||||||
if (key_len > block_size)
|
if (key_len > block_size)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user