mirror of
https://github.com/mpv-player/mpv
synced 2025-01-19 22:01:10 +00:00
demux_asf: add sanity check
Check that rlen is valid before using it to increment a pointer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32832 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
179cb785e9
commit
851bb3ce82
@ -468,6 +468,10 @@ static int demux_asf_fill_buffer(demuxer_t *demux, demux_stream_t *ds){
|
||||
rlen = read_varlen(&p, segtype, 0);
|
||||
|
||||
// printf("### rlen=%d \n",rlen);
|
||||
if (rlen < 0 || rlen > p_end - p) {
|
||||
mp_msg(MSGT_DEMUX, MSGL_V, "invalid rlen=%d\n", rlen);
|
||||
break;
|
||||
}
|
||||
|
||||
switch(rlen){
|
||||
case 0x01: // 1 = special, means grouping
|
||||
|
Loading…
Reference in New Issue
Block a user