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