[FFmpeg-devel] [PATCH] vp9: change type of tile_size from unsigned to int64_t

Clément Bœsch u at pkh.me
Mon Jun 8 21:53:32 CEST 2015


On Mon, Jun 08, 2015 at 09:45:07PM +0200, Andreas Cadhalpun wrote:
> On 07.06.2015 22:30, Ronald S. Bultje wrote:
> > Hi,
> > 
> > On Sun, Jun 7, 2015 at 1:02 PM, Andreas Cadhalpun <
> > andreas.cadhalpun at googlemail.com> wrote:
> > 
> >> Otherwise the check 'tile_size < size' treats a negative size as
> >> unsigned, causing the check to pass. This subsequently leads to
> >> segmentation faults.
> >>
> >> This was originally fixed as part of Libav commit 72ca83, so the
> >> original author is one of the following developers:
> >>         Anton Khirnov <anton at khirnov.net>
> >>         Diego Biurrun <diego at biurrun.de>
> >>         Luca Barbato <lu_zero at gentoo.org>
> >>         Martin Storsjö <martin at martin.st>
> >>
> >> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
> >> ---
> >>
> >> Does someone still remember who authored this particular change,
> >> so that he can get proper attribution?
> >>
> >> ---
> >>  libavcodec/vp9.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
> >> index c4efd42..d5147e5 100644
> >> --- a/libavcodec/vp9.c
> >> +++ b/libavcodec/vp9.c
> >> @@ -4106,7 +4106,7 @@ static int vp9_decode_frame(AVCodecContext *ctx,
> >> void *frame,
> >>                              tile_row, s->tiling.log2_tile_rows,
> >> s->sb_rows);
> >>              if (s->pass != 2) {
> >>                  for (tile_col = 0; tile_col < s->tiling.tile_cols;
> >> tile_col++) {
> >> -                    unsigned tile_size;
> >> +                    int64_t tile_size;
> > 
> > 
> > Hm... OK.
> 
> Pushed.
> 

For the record; we extracted and aknowledged that change at the time of
the merge, but we didn't figure out what it was actually fixing. Thanks
for looking into this. IIRC that was the only unmerged functional change.

> Best regards,
> Andreas
> 

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150608/c2eb07b4/attachment.asc>


More information about the ffmpeg-devel mailing list