ref: 845744d39c7f95df3b5b8343ced219e8d5d6590f
parent: f40f3803ae5f56c93f53f5ea29fc55c10a9473a5
author: Diego Biurrun <[email protected]>
date: Tue Oct 28 08:34:41 EDT 2014
css: Check the return value of a malloc() invocation This prevents a possible NULL pointer dereference further along.
--- a/src/css.c
+++ b/src/css.c
@@ -297,6 +297,10 @@
/* Write in the new title and its key */
p_newtitle = malloc( sizeof( dvd_title_t ) );
+ if( p_newtitle == NULL )
+ {
+ return -1;
+ }
p_newtitle->i_startlb = i_block;
memcpy( p_newtitle->p_key, p_title_key, KEY_SIZE );