Message ID | 20170721094945.3950-1-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | 47c93657249f1a4bc8a7aaf2f9f3a33510bee38c |
Headers | show |
On Fri, Jul 21, 2017 at 4:49 PM, Michael Niedermayer <michael@niedermayer.cc> wrote: > From: Vodyannikov Aleksandr <Aleksoid1978@mail.ru> > > Fixes: Ticket6546 > > Regression since: 54aaadf648073149f1ac34f56cbde4e6c5aa22ef > > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > --- > libavcodec/cfhd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c > index f78bad9ae1..5ea8f24821 100644 > --- a/libavcodec/cfhd.c > +++ b/libavcodec/cfhd.c > @@ -332,7 +332,7 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame, > s->plane[s->channel_num].band[0][0].stride = data; > } else if (tag == 28) { > av_log(avctx, AV_LOG_DEBUG, "Lowpass height %"PRIu16"\n", data); > - if (data < 3 || data > s->plane[s->channel_num].band[0][0].height) { > + if (data < 3 || data > s->plane[s->channel_num].band[0][0].a_height) { > av_log(avctx, AV_LOG_ERROR, "Invalid lowpass height\n"); > ret = AVERROR(EINVAL); > break; > -- LGTM. Look at Libav repo, it is checked with a_height. Thank's.
> > LGTM. Look at Libav repo, it is checked with a_height. > > Thank's. > Patch OK. As author of this code I would highly recommend not looking at libav repo because they broke a ton of stuff. Kieran
On Sat, Jul 22, 2017 at 05:14:10PM +0000, Kieran Kunhya wrote: > > > > LGTM. Look at Libav repo, it is checked with a_height. > > > > Thank's. > > > > Patch OK. As author of this code I would highly recommend not looking at > libav repo because they broke a ton of stuff. will be in my next git push thx [...]
diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c index f78bad9ae1..5ea8f24821 100644 --- a/libavcodec/cfhd.c +++ b/libavcodec/cfhd.c @@ -332,7 +332,7 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame, s->plane[s->channel_num].band[0][0].stride = data; } else if (tag == 28) { av_log(avctx, AV_LOG_DEBUG, "Lowpass height %"PRIu16"\n", data); - if (data < 3 || data > s->plane[s->channel_num].band[0][0].height) { + if (data < 3 || data > s->plane[s->channel_num].band[0][0].a_height) { av_log(avctx, AV_LOG_ERROR, "Invalid lowpass height\n"); ret = AVERROR(EINVAL); break;