Browse Source

base64: fix signed overflow in shift

Signed-off-by: Mans Rullgard <mans@mansr.com>
tags/n1.1
Mans Rullgard 13 years ago
parent
commit
dd3b73f390
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavutil/base64.c

+ 2
- 2
libavutil/base64.c View File

@@ -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)


Loading…
Cancel
Save