Commit b838527c authored by Rémi Duraffort's avatar Rémi Duraffort Committed by Derk-Jan Hartman

Fix potential segfault (don't dereference strrchr directly) CID 35.

(cherry picked from commit 74d28b3e)
Signed-off-by: default avatarDerk-Jan Hartman <hartman@videolan.org>
parent 893312a6
......@@ -218,7 +218,10 @@ static int ParseLine ( demux_t *p_demux, char *psz_line )
psz_bol += sizeof("Stream=\"") - 1;
if ( !psz_bol )
return 0;
strrchr( psz_bol, '"' )[0] = '\0';
char* psz_tmp = strrchr( psz_bol, '"' );
if( !psz_tmp )
return 0;
psz_tmp[0] = '\0';
/* We cheat around xdma. for some reason xdma links work different then rtsp */
if( !strncasecmp( psz_bol, "xdma://", sizeof("xdma://") - 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