Commit dd3b73f3 authored by Mans Rullgard's avatar Mans Rullgard

base64: fix signed overflow in shift

Signed-off-by: 's avatarMans Rullgard <mans@mansr.com>
parent 7709ce02
...@@ -44,10 +44,10 @@ static const uint8_t map2[] = ...@@ -44,10 +44,10 @@ static const uint8_t map2[] =
int av_base64_decode(uint8_t *out, const char *in, int out_size) 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; uint8_t *dst = out;
v = 0;
for (i = 0; in[i] && in[i] != '='; i++) { for (i = 0; in[i] && in[i] != '='; i++) {
unsigned int index= in[i]-43; unsigned int index= in[i]-43;
if (index>=FF_ARRAY_ELEMS(map2) || map2[index] == 0xff) if (index>=FF_ARRAY_ELEMS(map2) || map2[index] == 0xff)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment