From: Sébastien Escudier Date: Wed, 19 Jun 2013 20:43:49 +0000 (+0000) Subject: mjpeg : remove optional quotes from MIME boundary X-Git-Tag: 2.1.0-git~88 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=fbb82370e75217bbb3a449d884b95091e9aaa59b;p=vlc mjpeg : remove optional quotes from MIME boundary --- diff --git a/modules/demux/mjpeg.c b/modules/demux/mjpeg.c index 2ae4ec79d2..8def7f809a 100644 --- a/modules/demux/mjpeg.c +++ b/modules/demux/mjpeg.c @@ -322,7 +322,15 @@ static int Open( vlc_object_t * p_this ) char* boundary = strstr( content_type, "boundary=" ); if( boundary ) { - p_sys->psz_separator = strdup( boundary + strlen("boundary=") ); + boundary += strlen( "boundary=" ); + size_t len = strlen( boundary ); + if( len > 2 && boundary[0] == '"' + && boundary[len-1] == '"' ) + { + boundary[len-1] = '\0'; + boundary++; + } + p_sys->psz_separator = strdup( boundary ); if( !p_sys->psz_separator ) { free( content_type );