On Fri, Nov 29, 2019 at 08:44:09PM +0100, Andreas Rheinhardt wrote: > During parsing a flac picture metadata block, the mimetype is read as > follows: Its 32b size field is read and checked for being in the range > 1..63; afterwards, the actual mimetype-string is read into a buffer of > size 64, where the length to read is the minimum of the length field and > the size of the destination buffer -1. Then an assert guards that length > is indeed < the size of the destination buffer before the string in the > buffer is zero-terminated. > > The FFMIN as well as the assert are actually redundant, as it has > been checked that the string (even after terminating) fits into the > buffer. In order to make this clear, reword the check "len >= 64" to > "len >= sizeof(mimetype)" and drop the FFMIN as well as the assert. > > Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@gmail.com> > --- > libavformat/flac_picture.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-)
will apply patchset thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Republics decline into democracies and democracies degenerate into despotisms. -- Aristotle
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".