[FFmpeg-devel] [PATCH 3/5] avcodec/smacker: cleanup on errors in smka_decode_frame()
Michael Niedermayer
michael at niedermayer.cc
Wed Oct 16 19:46:24 EEST 2019
On Sun, Oct 13, 2019 at 12:20:28AM -0300, James Almer wrote:
> On 10/10/2019 7:40 PM, Michael Niedermayer wrote:
> > Fixes: multiple memleaks
> > Fixes: 17660/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMACKAUD_fuzzer-5689769928949760
> > Fixes: 18064/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMACKAUD_fuzzer-5631086809317376
> >
> > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> > ---
> > libavcodec/smacker.c | 30 ++++++++++++++++++++----------
> > 1 file changed, 20 insertions(+), 10 deletions(-)
> >
> > diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
> > index a2950c455b..901cdb1fb1 100644
> > --- a/libavcodec/smacker.c
> > +++ b/libavcodec/smacker.c
> > @@ -721,8 +721,10 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data,
> > for(i = 0; i <= stereo; i++)
> > *samples++ = pred[i];
> > for(; i < unp_size / 2; i++) {
> > - if(get_bits_left(&gb)<0)
> > - return AVERROR_INVALIDDATA;
> > + if(get_bits_left(&gb)<0) {
>
> Take the opportunity to add white spaces here and the other changed case
> below.
will apply with white space improved
thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20191016/a801c6f0/attachment.sig>
More information about the ffmpeg-devel
mailing list