Skip to content
Snippets Groups Projects
Commit 378a764c authored by deuce's avatar deuce
Browse files

Return -1 on invalid chars.

parent 3fd2f2c2
No related branches found
No related tags found
No related merge requests found
......@@ -62,7 +62,7 @@ int b64_decode(char *target, size_t tlen, const char *source, size_t slen)
working<<=6;
i=strchr(base64alphabet,(char)*inp);
if(i==NULL) {
break;
return(-1);
}
if(*i!='=') { /* pad char */
working |= (i-base64alphabet);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment