Commit 8baae61a authored by JP Dinger's avatar JP Dinger
Browse files

Fix another realloc() that can easily be fixed. The other one in the file

I don't immediately see a solution for.
parent afba4440
......@@ -89,7 +89,9 @@ static int StoreString( demux_t *p_demux, char **ppsz_string,
}
*buf++ = '\0';
buf = *ppsz_string = realloc (*ppsz_string, buf - *ppsz_string);
buf = realloc (*ppsz_string, buf - *ppsz_string);
if( buf )
*ppsz_string = buf;
}
return VLC_SUCCESS;
}
......@@ -250,6 +252,7 @@ static int Demux( demux_t *p_demux )
if( i_read < p_sys->i_data_len - i_pos ) break; /* Done */
/* XXX this looks fishy and inefficient */
i_pos += i_read;
p_sys->i_data_len += 1024;
p_sys->psz_data = realloc( p_sys->psz_data, p_sys->i_data_len * sizeof( char * ) +1 );
......
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