mirror of https://github.com/mpv-player/mpv
stream/realrtsp/real.c: Fix another integer overflow
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29455 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
7c240e0268
commit
45b7b9374b
|
@ -382,6 +382,8 @@ int real_get_rdt_chunk(rtsp_t *rtsp_session, char **buffer, int rdt_rawdata) {
|
||||||
ph.flags=0;
|
ph.flags=0;
|
||||||
*buffer = xbuffer_ensure_size(*buffer, 12+size);
|
*buffer = xbuffer_ensure_size(*buffer, 12+size);
|
||||||
if(rdt_rawdata) {
|
if(rdt_rawdata) {
|
||||||
|
if (size < 12)
|
||||||
|
return 0;
|
||||||
n=rtsp_read_data(rtsp_session, *buffer, size-12);
|
n=rtsp_read_data(rtsp_session, *buffer, size-12);
|
||||||
return (n <= 0) ? 0 : n;
|
return (n <= 0) ? 0 : n;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue