mirror of
https://github.com/librempeg/librempeg
synced 2024-11-21 16:44:05 +00:00
avformat/dvdvideodec: check the length of a NAV packet when reading titles
Some discs present titles with bogus NAV packets. We apply this check for menus and for title MPEG blocks, but we should also apply it for NAV packets during title demuxing. Signed-off-by: Marth64 <marth64@proxyid.net>
This commit is contained in:
parent
11e5b36a95
commit
0f8c560f7f
@ -740,6 +740,13 @@ static int dvdvideo_play_next_ps_block(AVFormatContext *s, DVDVideoPlaybackState
|
||||
return AVERROR_EOF;
|
||||
}
|
||||
|
||||
if (nav_len != DVDVIDEO_BLOCK_SIZE) {
|
||||
av_log(s, AV_LOG_ERROR, "Invalid NAV packet size (expected=%d actual=%d)\n",
|
||||
DVDVIDEO_BLOCK_SIZE, nav_len);
|
||||
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
e_pci = dvdnav_get_current_nav_pci(state->dvdnav);
|
||||
e_dsi = dvdnav_get_current_nav_dsi(state->dvdnav);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user