[crypto,per] abort on invalid parameters

This commit is contained in:
akallabeth 2024-10-22 15:51:44 +02:00
parent 5f86284663
commit 88d9b1f110
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5

View File

@ -333,6 +333,8 @@ BOOL per_read_integer16(wStream* s, UINT16* integer, UINT16 min)
BOOL per_write_integer16(wStream* s, UINT16 integer, UINT16 min)
{
if (min > integer)
return FALSE;
if (!Stream_EnsureRemainingCapacity(s, 2))
return FALSE;
Stream_Write_UINT16_BE(s, integer - min);