From c24e6c9c336c9df884f597a6610b765db917280f Mon Sep 17 00:00:00 2001 From: Jon Lech Johansen Date: Wed, 12 May 2004 21:44:59 +0000 Subject: [PATCH] * drms.c: Check that key store is at least 4 bytes (fixes segfault on empty key store). --- modules/demux/mp4/drms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/demux/mp4/drms.c b/modules/demux/mp4/drms.c index 647e96b0be..e3eb677569 100644 --- a/modules/demux/mp4/drms.c +++ b/modules/demux/mp4/drms.c @@ -1799,7 +1799,7 @@ static int GetSCIData( char *psz_ipod, uint32_t **pp_sci, { struct stat st; - if( !fstat( fileno( file ), &st ) ) + if( !fstat( fileno( file ), &st ) && st.st_size >= 4 ) { *pp_sci = malloc( st.st_size ); if( *pp_sci != NULL ) -- 2.39.5