Commit c24e6c9c authored by Jon Lech Johansen's avatar Jon Lech Johansen

* drms.c: Check that key store is at least 4 bytes (fixes segfault

            on empty key store).
parent ac01cdf7
......@@ -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 )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment