mirror of https://github.com/mpv-player/mpv
unconditionally stop allocating memory for dvb_channel_t after 1 MB: it's unreasonably big
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18472 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
d6081d2977
commit
72d7809458
|
@ -387,6 +387,11 @@ static dvb_channels_list *dvb_get_channels(char *filename, int type)
|
|||
list->channels = tmp;
|
||||
memcpy(&(list->channels[list->NUM_CHANNELS]), ptr, sizeof(dvb_channel_t));
|
||||
list->NUM_CHANNELS++;
|
||||
if(sizeof(dvb_channel_t) * list->NUM_CHANNELS >= 1024*1024)
|
||||
{
|
||||
mp_msg(MSGT_DEMUX, MSGL_V, "dvbin.c, > 1MB allocated for channels struct, dropping the rest of the file\r\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
|
|
Loading…
Reference in New Issue