[FFmpeg-devel,vorbis] Fix another 1 << 31 > int32_t::max() with 1u.

Submitted by Dale Curtis on Nov. 30, 2017, 8:22 p.m.

Details

Message ID CAPUDrweX-d7S7WXp_61cRrH_AtX7dW7Hc6=7+T7Lj-4iDJ4bLg@mail.gmail.com
State New
Headers show

Commit Message

Dale Curtis Nov. 30, 2017, 8:22 p.m.
Didn't notice this one when 9648cc6d was landed.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>

Comments

Michael Niedermayer Dec. 1, 2017, 4:23 p.m.
On Thu, Nov 30, 2017 at 12:22:46PM -0800, Dale Curtis wrote:
> Didn't notice this one when 9648cc6d was landed.
> 
> Signed-off-by: Dale Curtis <dalecurtis@chromium.org>

>  vorbis.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> c86adca961a08a6f7cd4a8233d0cef4b971073d8  fix_vorbis_v1.patch
> From 2f7c0ee007cb28b8f3bf201279d7f17ca671728d Mon Sep 17 00:00:00 2001
> From: Dale Curtis <dalecurtis@chromium.org>
> Date: Thu, 30 Nov 2017 12:20:36 -0800
> Subject: [PATCH] [vorbis] Fix another 1 << 31 > int32_t::max() with 1u.
> 
> Didn't notice this one when 9648cc6d was landed.

will apply

thanks

[...]

Patch hide | download patch | download mbox

From 2f7c0ee007cb28b8f3bf201279d7f17ca671728d Mon Sep 17 00:00:00 2001
From: Dale Curtis <dalecurtis@chromium.org>
Date: Thu, 30 Nov 2017 12:20:36 -0800
Subject: [PATCH] [vorbis] Fix another 1 << 31 > int32_t::max() with 1u.

Didn't notice this one when 9648cc6d was landed.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
---
 libavcodec/vorbis.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/vorbis.c b/libavcodec/vorbis.c
index 5ccc37a2df..cca2aa7c63 100644
--- a/libavcodec/vorbis.c
+++ b/libavcodec/vorbis.c
@@ -67,7 +67,7 @@  int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, unsigned num)
     if (bits[p] > 32)
         return AVERROR_INVALIDDATA;
     for (i = 0; i < bits[p]; ++i)
-        exit_at_level[i+1] = 1 << i;
+        exit_at_level[i+1] = 1u << i;
 
     ++p;
 
-- 
2.15.0.531.g2ccb3012c9-goog