[vlc-commits] packetizer:copy: fix unchecked memory allocation
Steve Lhomme
git at videolan.org
Wed Jul 12 12:22:59 CEST 2017
vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Mon Jul 10 16:21:27 2017 +0200| [4efa74c715fdb98a9641963b18a74541be091c35] | committer: Jean-Baptiste Kempf
packetizer:copy: fix unchecked memory allocation
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4efa74c715fdb98a9641963b18a74541be091c35
---
modules/packetizer/copy.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules/packetizer/copy.c b/modules/packetizer/copy.c
index b9ee6d107a..6d442d9e47 100644
--- a/modules/packetizer/copy.c
+++ b/modules/packetizer/copy.c
@@ -106,6 +106,9 @@ static int Open( vlc_object_t *p_this )
}
p_dec->p_sys = p_sys = malloc( sizeof(*p_sys) );
+ if (unlikely(p_sys == NULL))
+ return VLC_ENOMEM;
+
p_sys->p_block = NULL;
switch( p_dec->fmt_in.i_codec )
{
More information about the vlc-commits
mailing list