mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-09 16:19:35 +00:00
ffserver: Use av_malloc_array()
Reviewed-by: "Reynaldo H. Verdejo Pinochet" <reynaldo@osg.samsung.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
da02ee127a
commit
11d8fa5e9d
@ -2810,11 +2810,9 @@ static int prepare_sdp_description(FFServerStream *stream, uint8_t **pbuffer,
|
|||||||
snprintf(avc->filename, 1024, "rtp://0.0.0.0");
|
snprintf(avc->filename, 1024, "rtp://0.0.0.0");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (avc->nb_streams >= INT_MAX/sizeof(*avc->streams) ||
|
if (!(avc->streams = av_malloc_array(avc->nb_streams, sizeof(*avc->streams))))
|
||||||
!(avc->streams = av_malloc(avc->nb_streams * sizeof(*avc->streams))))
|
|
||||||
goto sdp_done;
|
goto sdp_done;
|
||||||
if (avc->nb_streams >= INT_MAX/sizeof(*avs) ||
|
if (!(avs = av_malloc_array(avc->nb_streams, sizeof(*avs))))
|
||||||
!(avs = av_malloc(avc->nb_streams * sizeof(*avs))))
|
|
||||||
goto sdp_done;
|
goto sdp_done;
|
||||||
|
|
||||||
for(i = 0; i < stream->nb_streams; i++) {
|
for(i = 0; i < stream->nb_streams; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user