Skip to content

Commit 64fdd4c

Browse files
author
Chen, Bohan
committed
Fix coveirty overflowed issues
Signed-off-by: Chen, Bohan <[email protected]>
1 parent 457a59b commit 64fdd4c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

encode/av1encode.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2536,6 +2536,7 @@ static int save_codeddata(unsigned long long display_order, unsigned long long e
25362536
if(encode_order == 0)
25372537
{
25382538
//first frame
2539+
CHECK_CONDITION(coded_size >= 44);
25392540
unsigned int ivf_size = coded_size - 32 - 12;
25402541
ret = fseek(coded_fp, frame_start + 32, SEEK_SET);
25412542
CHECK_CONDITION(ret == 0);
@@ -2547,6 +2548,7 @@ static int save_codeddata(unsigned long long display_order, unsigned long long e
25472548
else
25482549
{
25492550
//other frames
2551+
CHECK_CONDITION(coded_size >= 12);
25502552
unsigned int ivf_size = coded_size - 12;
25512553
ret = fseek(coded_fp, frame_start, SEEK_SET);
25522554
CHECK_CONDITION(ret == 0);

0 commit comments

Comments
 (0)