mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 13:55:06 -05:00
nts: check for negative length in NNA_DecryptAuthEF()
As other functions that accept a signed length, make sure it is sane in NNA_DecryptAuthEF() too.
This commit is contained in:
@@ -128,6 +128,9 @@ NNA_DecryptAuthEF(NTP_Packet *packet, NTP_PacketInfo *info, SIV_Instance siv, in
|
||||
void *ef_body;
|
||||
struct AuthHeader *header;
|
||||
|
||||
if (buffer_length < 0)
|
||||
return 0;
|
||||
|
||||
if (!NEF_ParseField(packet, info->length, ef_start,
|
||||
NULL, &ef_type, &ef_body, &ef_body_length))
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user