Commit 7f052bbd authored by Rafaël Carré's avatar Rafaël Carré

Fix "Fix httpd stack corruption"

parent 6941f189
......@@ -263,11 +263,10 @@ static int Open( vlc_object_t *p_this )
i_port= 8080;
}
/* maximum port is 65535 , strlen("65535") == 5 */
psz_tmp = malloc( ( strlen( psz_address ) + 5 ) * sizeof( char) );
/* maximum port is 65535 , strlen("65535") = 5 , + ':' = 6 */
psz_tmp = malloc( ( strlen( psz_address ) + 6 ) * sizeof( char) );
/* Ugly hack to allow to run several HTTP servers on different ports. */
sprintf( psz_tmp, "%s:%d", psz_address, i_port + 1 );
var_SetString( p_intf->p_libvlc_global, "http-host", psz_tmp );
free( psz_tmp );
......
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