diff options
author | Mans Rullgard <mans@mansr.com> | 2012-11-24 13:03:53 +0000 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2012-11-26 13:34:58 +0000 |
commit | dd3b73f3905c61c99f1d3fb58bc7ee380eb8aa2e (patch) | |
tree | 97e4b88e390322ce1bff80f3e42051200c4cd4d9 /libavutil | |
parent | 7709ce029a7bc101b9ac1ceee607cda10dcb89dc (diff) | |
download | ffmpeg-dd3b73f3905c61c99f1d3fb58bc7ee380eb8aa2e.tar.gz |
base64: fix signed overflow in shift
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/base64.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/base64.c b/libavutil/base64.c index 73872b8c99..c1fba897be 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) |