mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
[BugFix] vorbis.c metadata invalid index when album art b64 is NULL
Change-Id: I9d08c2e2c903c00d0b2fd25e0dceea28113874a2
This commit is contained in:
parent
10923de8fe
commit
ac8714dd64
1 changed files with 8 additions and 1 deletions
|
@ -327,7 +327,14 @@ size_t base64_decode(const char *in, size_t in_len, unsigned char *out)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
val = (val << 6) | b64_codes[in[i] - B64_START_CHAR];
|
int index = in[i] - B64_START_CHAR;
|
||||||
|
if (index < 0 || index >= (int)ARRAYLEN(b64_codes))
|
||||||
|
{
|
||||||
|
out[len] = '\0';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
val = (val << 6) | b64_codes[index];
|
||||||
|
|
||||||
if ((++i & 3) == 0)
|
if ((++i & 3) == 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue