The 62nd character in base64 is +, not . syslinux-3.20-pre3
authorH. Peter Anvin <hpa@smyrno.hos.anvin.org>
Tue, 4 Oct 2005 04:38:39 +0000 (21:38 -0700)
committerH. Peter Anvin <hpa@smyrno.hos.anvin.org>
Tue, 4 Oct 2005 04:38:39 +0000 (21:38 -0700)
com32/libutil/unbase64.c

index 83007d3..a3948aa 100644 (file)
@@ -36,7 +36,7 @@
 #include <base64.h>
 
 static const unsigned char _base64chars[] =
-"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789./";
+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
 
 size_t unbase64(unsigned char *buffer, size_t bufsiz, const char *txt)
 {
@@ -55,6 +55,7 @@ size_t unbase64(unsigned char *buffer, size_t bufsiz, const char *txt)
   }
   
   /* Also support filesystem safe alternate base64 encoding */
+  base64tbl['.'] = 62;
   base64tbl['-'] = 62;
   base64tbl['_'] = 63;