[FFmpeg-devel] [PATCH] avformat/img2dec: skip DHT segment in jpeg_probe()

Michael Niedermayer michael at niedermayer.cc
Thu Apr 2 02:23:24 EEST 2020


On Wed, Apr 01, 2020 at 03:28:06PM +0200, Matthieu Bouron wrote:
> On Wed, Apr 01, 2020 at 01:04:58PM +0100, Derek Buitenhuis wrote:
> > On 01/04/2020 09:52, Matthieu Bouron wrote:
> > > ---
> > >  libavformat/img2dec.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > 
> > Looks correct, but a commit message explaining why would be good.
> > 
> 
> Would "Skips the DHT segment in jpeg_probe() to avoid looking for JPEG
> markers in the DHT segment data" be OK ?

i suspect that startcodes in a valid DHT are quite rare. It seems they
arent disallowed by the spec, just that a valid table with such values
would be a bit odd. In the bits array it would imply that basically 
all huffman codes are equal length.
So iam not sure this patch will affect any real files, but its more
proper to skip the DHT unless iam missing something.
So with a clear commit message patch should be ok

thx



[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If the United States is serious about tackling the national security threats 
related to an insecure 5G network, it needs to rethink the extent to which it
values corporate profits and government espionage over security.-Bruce Schneier
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200402/8ba8e910/attachment.sig>


More information about the ffmpeg-devel mailing list