diff --git a/lib/crypt-port.h b/lib/crypt-port.h index a7079396..e58ebe14 100644 --- a/lib/crypt-port.h +++ b/lib/crypt-port.h @@ -471,9 +471,8 @@ extern void make_failure_token (const char *setting, char *output, int size); /* The base-64 encoding table used by most hashing methods. - (bcrypt uses a slightly different encoding.) Size 65 - because it's used as a C string in a few places. */ -extern const unsigned char ascii64[65]; + (bcrypt uses a slightly different encoding.) */ +extern const unsigned char *ascii64; /* Same table gets used with other names in various places. */ #define b64t ((const char *) ascii64) diff --git a/lib/util-base64.c b/lib/util-base64.c index d55461fd..19e83b2a 100644 --- a/lib/util-base64.c +++ b/lib/util-base64.c @@ -20,8 +20,8 @@ #include "crypt-port.h" -const unsigned char ascii64[65] = - "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" +const unsigned char *ascii64 = + (const unsigned char *) + "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; /* 0000000000111111111122222222223333333333444444444455555555556666 */ /* 0123456789012345678901234567890123456789012345678901234567890123 */ - "\x00";