Commit 73e91f7f41 for ffmpeg
commit 73e91f7f41172e0b3b919e0cb53586bd7e5c678a
Author: Michael Niedermayer <michael@niedermayer.cc>
Date: Mon Nov 16 19:10:29 2026 +0100
avcodec/pgssubdec: reject object data lengths smaller than the dimension fields
The object data length includes the 4 bytes of width and height.
A smaller length wrapped around and was only rejected by the
allocation failing with ENOMEM.
diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c
index 3a4b60f419..af1c9536d8 100644
--- a/libavcodec/pgssubdec.c
+++ b/libavcodec/pgssubdec.c
@@ -236,7 +236,7 @@ static int parse_object_segment(AVCodecContext *avctx,
PGSSubObject *object;
uint8_t sequence_desc;
- unsigned int rle_bitmap_len, width, height;
+ int rle_bitmap_len, width, height;
int id;
if (buf_size <= 4)