X-Git-Url: http://www.average.org/gitweb/?p=pam_pcsc_cr.git;a=blobdiff_plain;f=base64.c;h=96ae3b8bca90897430b46309623dede1616c417b;hp=8f16cdc0306b0dd1125ab9ca40459f6e779ee95b;hb=HEAD;hpb=3203259877061eda8176ec2336b275d8b626bd45 diff --git a/base64.c b/base64.c index 8f16cdc..96ae3b8 100644 --- a/base64.c +++ b/base64.c @@ -91,6 +91,7 @@ static int base64_encode_block(const unsigned char* plaintext_in, int length_in, result = (fragment & 0x0fc) >> 2; *codechar++ = base64_encode_value(result); result = (fragment & 0x003) << 4; + /* fallthrough */ case step_B: if (plainchar == plaintextend) { @@ -102,6 +103,7 @@ static int base64_encode_block(const unsigned char* plaintext_in, int length_in, result |= (fragment & 0x0f0) >> 4; *codechar++ = base64_encode_value(result); result = (fragment & 0x00f) << 2; + /* fallthrough */ case step_C: if (plainchar == plaintextend) { @@ -140,7 +142,6 @@ static int base64_encode_blockend(char* code_out, base64_encodestate* state_in) case step_A: break; } - *codechar++ = '\n'; return codechar - code_out; } @@ -190,6 +191,7 @@ static int base64_decode_block(const char* code_in, const int length_in, unsigne fragment = (char)base64_decode_value(*codechar++); } while (fragment < 0); *plainchar = (fragment & 0x03f) << 2; + /* fallthrough */ case step_b: do { if (codechar == code_in+length_in) @@ -202,6 +204,7 @@ static int base64_decode_block(const char* code_in, const int length_in, unsigne } while (fragment < 0); *plainchar++ |= (fragment & 0x030) >> 4; *plainchar = (fragment & 0x00f) << 4; + /* fallthrough */ case step_c: do { if (codechar == code_in+length_in) @@ -214,6 +217,7 @@ static int base64_decode_block(const char* code_in, const int length_in, unsigne } while (fragment < 0); *plainchar++ |= (fragment & 0x03c) >> 2; *plainchar = (fragment & 0x003) << 6; + /* fallthrough */ case step_d: do { if (codechar == code_in+length_in)