[FFmpeg-cvslog] base64: fix signed overflow in shift
Mans Rullgard
git at videolan.org
Tue Nov 27 13:47:06 CET 2012
ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Sat Nov 24 13:03:53 2012 +0000| [dd3b73f3905c61c99f1d3fb58bc7ee380eb8aa2e] | committer: Mans Rullgard
base64: fix signed overflow in shift
Signed-off-by: Mans Rullgard <mans at mansr.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dd3b73f3905c61c99f1d3fb58bc7ee380eb8aa2e
---
libavutil/base64.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavutil/base64.c b/libavutil/base64.c
index 73872b8..c1fba89 100644
--- a/libavutil/base64.c
+++ b/libavutil/base64.c
@@ -44,10 +44,10 @@ static const uint8_t map2[] =
int av_base64_decode(uint8_t *out, const char *in, int out_size)
{
- int i, v;
+ int i;
+ unsigned v = 0;
uint8_t *dst = out;
- v = 0;
for (i = 0; in[i] && in[i] != '='; i++) {
unsigned int index= in[i]-43;
if (index>=FF_ARRAY_ELEMS(map2) || map2[index] == 0xff)
More information about the ffmpeg-cvslog
mailing list