[vlc-commits] demux/mp4: SetupAudioES: add missing error-check
Filip Roséen
git at videolan.org
Thu May 18 21:08:26 CEST 2017
vlc | branch: master | Filip Roséen <filip at atch.se> | Thu May 18 12:16:55 2017 +0200| [21096ae260f6b22d385265fd11a897e2638f9382] | committer: Jean-Baptiste Kempf
demux/mp4: SetupAudioES: add missing error-check
The changes introduced in 08a2eb61 correctly adds a new block for
reading from p_extra, it however left out the if-condition to protect
said block.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=21096ae260f6b22d385265fd11a897e2638f9382
---
modules/demux/mp4/essetup.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/modules/demux/mp4/essetup.c b/modules/demux/mp4/essetup.c
index e499c6b03f..cc53143881 100644
--- a/modules/demux/mp4/essetup.c
+++ b/modules/demux/mp4/essetup.c
@@ -913,6 +913,7 @@ int SetupAudioES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample )
{
size_t i_extra = p_dfLa->data.p_binary->i_blob;
uint8_t *p_extra = malloc(i_extra);
+ if( likely( p_extra ) )
{
p_track->fmt.i_extra = i_extra;
p_track->fmt.p_extra = p_extra;
More information about the vlc-commits
mailing list