mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-01-12 00:06:51 +08:00
avformat/sierravmd: fix header read error check
The header read check stored the comparison result into ret, so read
failures became ret=1 and were treated as success, leaving the VMD header
uninitialized and letting parsing continue with bogus state.
Regression since: ee623a43e3.
Found-by: Pwno
This commit is contained in:
@@ -103,7 +103,7 @@ static int vmd_read_header(AVFormatContext *s)
|
||||
|
||||
/* fetch the main header, including the 2 header length bytes */
|
||||
avio_seek(pb, 0, SEEK_SET);
|
||||
if ((ret = ffio_read_size(pb, vmd->vmd_header, VMD_HEADER_SIZE) < 0))
|
||||
if ((ret = ffio_read_size(pb, vmd->vmd_header, VMD_HEADER_SIZE)) < 0)
|
||||
return ret;
|
||||
|
||||
width = AV_RL16(&vmd->vmd_header[12]);
|
||||
|
||||
Reference in New Issue
Block a user