[FFmpeg-trac] #7920(avformat:new): "-strict_mime_boundary 1" doesn't actually apply a strict boundary
FFmpeg
trac at avcodec.org
Thu May 23 18:30:22 EEST 2019
#7920: "-strict_mime_boundary 1" doesn't actually apply a strict boundary
------------------------------------+------------------------------------
Reporter: barsnick | Owner:
Type: defect | Status: new
Priority: normal | Component: avformat
Version: git-master | Resolution:
Keywords: mpjpeg | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
------------------------------------+------------------------------------
Comment (by barsnick):
Root cause is this:
https://github.com/FFmpeg/FFmpeg/blob/b401a4ab8aa85c536bd9eee0da8f51551b66c70e/libavformat/mpjpegdec.c#L274
Using the call
{{{
if (!av_stristart(start, "boundary=", &start)) {
}}}
the function {{{mpjpeg_get_boundary()}}} tries to match the parameter for
the given multipart boundary.
{{{av_stristart(str, pfx, ptr)}}} is documented as:
Return non-zero if pfx is a prefix of str independent of case.
If it is, *ptr is set to the address of the first character in str after
the prefix.
So, assuming this call actually matches the "boundary=" parameter check,
it returns non-zero. Unfortunately, the code for the good (match) case is
checked with {{{!}}}, which means it incorrectly checks for zero. In other
words, the {{{!}}} is misplaced.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/7920#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list