Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

make the base64 implementation work on ARM

char is unsigned by default on ARM, leading to problems, see:
http://sourceforge.net/tracker/?func=detail&aid=3313901&group_id=152942&atid=785907

Thanks to user "yann" on Yubico forums for noticing this bug.
  • Loading branch information...
commit 6fcc3d49d1d9b733c5bd04e4e60d400ed97cda40 1 parent fe8b9c2
Klas Lindfors authored August 06, 2012
2  b64/cdecode.c
@@ -26,7 +26,7 @@ int base64_decode_block(const char* code_in, const int length_in, char* plaintex
26 26
 {
27 27
 	const char* codechar = code_in;
28 28
 	char* plainchar = plaintext_out;
29  
-	char fragment;
  29
+	signed char fragment;
30 30
 	
31 31
 	*plainchar = state_in->plainchar;
32 32
 	
2  b64/cencode.c
@@ -29,7 +29,7 @@ int base64_encode_block(const char* plaintext_in, int length_in, char* code_out,
29 29
 	const char* const plaintextend = plaintext_in + length_in;
30 30
 	char* codechar = code_out;
31 31
 	char result;
32  
-	char fragment;
  32
+	signed char fragment;
33 33
 	
34 34
 	result = state_in->result;
35 35
 	

0 notes on commit 6fcc3d4

Please sign in to comment.
Something went wrong with that request. Please try again.