[FFmpeg-devel] [PATCH 1/2] avformat/mpjpegdec: fix finding multipart boundary parameter

Michael Niedermayer michael at niedermayer.cc
Fri May 24 12:54:20 EEST 2019


On Thu, May 23, 2019 at 06:06:42PM +0200, Moritz Barsnick wrote:
> The string matching function's return value was evaluated incorrectly.
> 
> Fixes trac #7920.
> 
> Signed-off-by: Moritz Barsnick <barsnick at gmx.net>
> ---
>  libavformat/mpjpegdec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/mpjpegdec.c b/libavformat/mpjpegdec.c
> index e653b5cc93..a23469c0ec 100644
> --- a/libavformat/mpjpegdec.c
> +++ b/libavformat/mpjpegdec.c
> @@ -271,7 +271,7 @@ static char* mpjpeg_get_boundary(AVIOContext* pb)
>          while (av_isspace(*start))
>              start++;
> 
> -        if (!av_stristart(start, "boundary=", &start)) {
> +        if (av_stristart(start, "boundary=", &start)) {
>              end = strchr(start, ';');
>              if (end)
>                  len = end - start - 1;

LGTM
a testcase in fate would be good

thx

[...]



-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190524/89c186a4/attachment.sig>


More information about the ffmpeg-devel mailing list