Commit d09ccf63 authored by Sam Hocevar's avatar Sam Hocevar

* modules/control/http/rpn.c: don’t crash if stripslashed string ends with \

parent 274346a3
......@@ -401,15 +401,14 @@ void E_(EvaluateRPN)( intf_thread_t *p_intf, mvar_t *vars,
p = psz_dest = strdup( psz_src );
while( *psz_src != '\0' )
while( *psz_src )
{
if( *psz_src == '\\' )
if( *psz_src == '\\' && *(psz_src + 1) )
{
*psz_src++;
}
*p++ = *psz_src;
psz_src++;
}
*p++ = *psz_src++;
}
*p = '\0';
E_(SSPush)( st, psz_dest );
......
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