Commit 49df0245 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

zip: Check malloc return.

parent 608be371
......@@ -326,6 +326,8 @@ static int AccessSeek( access_t *p_access, uint64_t seek_len )
unsigned i_seek = 0;
int i_read = 1;
char *p_buffer = ( char* ) calloc( 1, ZIP_BUFFER_LEN );
if( unlikely( !p_buffer ) )
return VLC_EGENERIC;
while( ( i_seek < seek_len ) && ( i_read > 0 ) )
{
i_read = ( seek_len - i_seek < ZIP_BUFFER_LEN )
......
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