mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
check on length of unwrap before memmove
This commit is contained in:
@ -2683,6 +2683,9 @@ int ToTraditional_ex(byte* input, word32 sz, word32* algId)
|
||||
if (length < 0)
|
||||
return length;
|
||||
|
||||
if (length + inOutIdx > sz)
|
||||
return BUFFER_E;
|
||||
|
||||
XMEMMOVE(input, input + inOutIdx, length);
|
||||
|
||||
return length;
|
||||
|
Reference in New Issue
Block a user