[FFmpeg-devel] [PATCH 2/3] avformat/oggparsedaala: Do not leave an invalid value in gpshift
Michael Niedermayer
michael at niedermayer.cc
Sat Apr 1 23:09:55 EEST 2017
On Sat, Apr 01, 2017 at 09:04:48PM +0100, Rostislav Pehlivanov wrote:
> On 1 April 2017 at 18:18, Michael Niedermayer <michael at niedermayer.cc>
> wrote:
>
> > Fixes: undefined behavior
> > Fixes: 702974
> >
> > Found-by: Thomas Guilbert <tguilbert at google.com>
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> > ---
> > libavformat/oggparsedaala.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/libavformat/oggparsedaala.c b/libavformat/oggparsedaala.c
> > index ce65b2bd7a..a373b41b4c 100644
> > --- a/libavformat/oggparsedaala.c
> > +++ b/libavformat/oggparsedaala.c
> > @@ -126,6 +126,7 @@ static int daala_header(AVFormatContext *s, int idx)
> > if (hdr->gpshift >= 32) {
> > av_log(s, AV_LOG_ERROR, "Too large gpshift %d (>= 32).\n",
> > hdr->gpshift);
> > + hdr->gpshift = 0;
> > return AVERROR_INVALIDDATA;
> > }
> > hdr->gpmask = (1U << hdr->gpshift) - 1;
> > --
> > 2.11.0
> >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
>
> LGTM, thanks
applied
thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- 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/20170401/e8df6176/attachment.sig>
More information about the ffmpeg-devel
mailing list