mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-28 10:22:10 +00:00
mxfdec: Fix a potential DoS vector in mxf_read_pixel_layout()
There's a a potential DoS problem in this function. Say an MXF file is created with a PixelLayout with a long run of non-zeroes. Such a file could be sent quickly (packed) over the net and would unpack quite fast. mxfdec would then read it byte-by-byte, which would take considerable time. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
187630b244
commit
1d22d269f5
@ -792,7 +792,8 @@ static void mxf_read_pixel_layout(AVIOContext *pb, MXFDescriptor *descriptor)
|
||||
if (ofs <= 14) {
|
||||
layout[ofs++] = code;
|
||||
layout[ofs++] = value;
|
||||
}
|
||||
} else
|
||||
break; /* don't read byte by byte on sneaky files filled with lots of non-zeroes */
|
||||
} while (code != 0); /* SMPTE 377M E.2.46 */
|
||||
|
||||
ff_mxf_decode_pixel_layout(layout, &descriptor->pix_fmt);
|
||||
|
Loading…
Reference in New Issue
Block a user