[FFmpeg-devel] [PATCH] avcodec/h264_ps: Check chroma_qp_index_offset

Michael Niedermayer michael at niedermayer.cc
Wed Feb 22 20:17:39 EET 2017


On Wed, Feb 22, 2017 at 04:41:43PM +0100, Paul B Mahol wrote:
> On 2/22/17, Michael Niedermayer <michael at niedermayer.cc> wrote:
> > On Wed, Feb 22, 2017 at 02:29:00PM +0100, Paul B Mahol wrote:
> >> On 2/22/17, Michael Niedermayer <michael at niedermayer.cc> wrote:
> >> > Fixes: 647/clusterfuzz-testcase-5195745823031296
> >> >
> >> > Found-by: continuous fuzzing process
> >> > https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
> >> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> >> > ---
> >> >  libavcodec/h264_ps.c | 11 +++++++++++
> >> >  1 file changed, 11 insertions(+)
> >> >
> >> > diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
> >> > index 8090178395..f4a4a01fbe 100644
> >> > --- a/libavcodec/h264_ps.c
> >> > +++ b/libavcodec/h264_ps.c
> >> > @@ -828,6 +828,12 @@ int
> >> > ff_h264_decode_picture_parameter_set(GetBitContext
> >> > *gb, AVCodecContext *avct
> >> >      pps->init_qp                              = get_se_golomb(gb) + 26
> >> > +
> >> > qp_bd_offset;
> >> >      pps->init_qs                              = get_se_golomb(gb) + 26
> >> > +
> >> > qp_bd_offset;
> >> >      pps->chroma_qp_index_offset[0]            = get_se_golomb(gb);
> >> > +    if (pps->chroma_qp_index_offset[0] < -12 ||
> >> > pps->chroma_qp_index_offset[0] > 12) {
> >> > +        av_log(avctx, AV_LOG_ERROR, "chroma_qp_index_offset[0] %d is
> >>
> >> This is nonsense. Please remove.
> >
> > Id like to keep the error messages or id like to have someone else
> > take over h264 maintaince in ffmpeg.
> 
> Than why you are posting patches at all, if you do not want to listen
> to reviews.

ive posted a patchset with ff_elog() instead

do people prefer that ?

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

Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.
-------------- 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/20170222/fccd575c/attachment.sig>


More information about the ffmpeg-devel mailing list