Commit c807ee69 authored by Andreas Rheinhardt's avatar Andreas Rheinhardt

avformat/asfcrypt: Fix wrong array length in function declaration

multiswap_step() and multiswap_inv_step() both only require
six keys; in all current callers, these keys are part of
an array of twelve keys, yet in some of these callers the keys
given to these functions point to the second half of these
twelve keys, so that only six keys are available to these functions.
This led to -Wstringop-overread warnings when compiling with GCC 12.1.
Fix these by adapting the declaration of these functions.
Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
parent 30c7cff3
......@@ -73,7 +73,7 @@ static void multiswap_invert_keys(uint32_t keys[12])
keys[i] = inverse(keys[i]);
}
static uint32_t multiswap_step(const uint32_t keys[12], uint32_t v)
static uint32_t multiswap_step(const uint32_t keys[6], uint32_t v)
{
int i;
v *= keys[0];
......@@ -85,7 +85,7 @@ static uint32_t multiswap_step(const uint32_t keys[12], uint32_t v)
return v;
}
static uint32_t multiswap_inv_step(const uint32_t keys[12], uint32_t v)
static uint32_t multiswap_inv_step(const uint32_t keys[6], uint32_t v)
{
int i;
v -= keys[5];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment