[FFmpeg-devel] [mpeg4video] Fix undefined shift on assumed 8-bit input.
Michael Niedermayer
michael at niedermayer.cc
Tue Nov 21 04:12:42 EET 2017
On Mon, Nov 20, 2017 at 01:31:06PM -0800, Dale Curtis wrote:
> On Mon, Nov 20, 2017 at 12:34 PM, Michael Niedermayer <
> michael at niedermayer.cc> wrote:
>
> > On Mon, Nov 20, 2017 at 12:01:11PM -0800, Dale Curtis wrote:
> > > Derp, that's the wrong comment for this; I meant that for another thread.
> > > Returning an error for optional user data seems a bit harsh, but if
> > that's
> > > what you want, I'm happy to change it. Please let me know if this is the
> > > route you want to take.
> >
> > it could print a warning and continue
> > but there should be something, the build/version is used to do bug
> > workarounds. If that is done incorrectly it can lead to decoding issues
> >
>
> Printing a warning sounds good to me. Done.
>
> - dale
> mpeg4videodec.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
> 2c25da550dca9cce06940bdec9b14925f7476fcb fix_mpeg4_shift_v2.patch
> From 2f0ae7719d20addeac4a8297a64eb57f8df9cdfd Mon Sep 17 00:00:00 2001
> From: Dale Curtis <dalecurtis at chromium.org>
> Date: Fri, 17 Nov 2017 16:05:30 -0800
> Subject: [PATCH] [mpeg4video] Fix undefined shift on assumed 8-bit input.
>
> decode_user_data() attempts to create an integer |build|
> value with 8 bits of spacing for 3 components. However
> each component is an int32_t, so shifting each component
> is undefined for values outside of the 8 bit range.
>
> This patch simply clamps input to 8-bits per component
> and prints out a warning that the values were clamped.
>
> Signed-off-by: Dale Curtis <dalecurtis at chromium.org>
> ---
> libavcodec/mpeg4videodec.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
applied
thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
He who knows, does not speak. He who speaks, does not know. -- Lao Tsu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171121/6baad33a/attachment.sig>
More information about the ffmpeg-devel
mailing list