2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
|
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
|
+
+
+
+
+
|
*/
if (data < dataend) {
c = *data++;
} else if (i > 1) {
c = '=';
} else {
if (strict && i <= 1) {
/* single resp. unfulfilled char (each 4th next single char)
* is rather bad64 error case in strict mode */
goto bad64;
}
cut += 3;
break;
}
/*
* Load the character into the block value. Handle ='s specially
* because they're only valid as the last character or two of the
|
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
|
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
|
-
+
+
+
-
+
|
value = (value << 6) | ((c - 'a' + 26) & 0x3f);
} else if (c >= '0' && c <= '9') {
value = (value << 6) | ((c - '0' + 52) & 0x3f);
} else if (c == '+') {
value = (value << 6) | 0x3e;
} else if (c == '/') {
value = (value << 6) | 0x3f;
} else if (c == '=') {
} else if (c == '=' && (
!strict || i > 1) /* "=" and "a=" is rather bad64 error case in strict mode */
) {
value <<= 6;
cut++;
if (i) cut++;
} else if (strict || !isspace(c)) {
goto bad64;
} else {
i--;
}
}
*cursor++ = UCHAR((value >> 16) & 0xff);
|