diff options
author | Richard Levitte <levitte@openssl.org> | 2010-01-27 11:14:46 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2010-01-27 11:14:46 +0000 |
commit | e6d8d6a89ae491106ff5860bcd339f1469ca350f (patch) | |
tree | bf5eb7cff5c855f24213c665470d57d9bc96b969 /crypto/evp/encode.c | |
parent | 0e785e5e093d4c24eaf531dd5ffc655e3a91c6b5 (diff) | |
download | openssl-new-e6d8d6a89ae491106ff5860bcd339f1469ca350f.tar.gz |
Merge main -> VMS_64BITBRANCH_VMS_64BIT
Diffstat (limited to 'crypto/evp/encode.c')
-rw-r--r-- | crypto/evp/encode.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/evp/encode.c b/crypto/evp/encode.c index 2968f6460a..b42c747249 100644 --- a/crypto/evp/encode.c +++ b/crypto/evp/encode.c @@ -85,7 +85,7 @@ #define CHUNKS_PER_LINE (64/4) #define CHAR_PER_LINE (64+1) -static unsigned char data_bin2ascii[65]="ABCDEFGHIJKLMNOPQRSTUVWXYZ\ +static const unsigned char data_bin2ascii[65]="ABCDEFGHIJKLMNOPQRSTUVWXYZ\ abcdefghijklmnopqrstuvwxyz0123456789+/"; /* 0xF0 is a EOLN @@ -102,7 +102,7 @@ abcdefghijklmnopqrstuvwxyz0123456789+/"; #define B64_ERROR 0xFF #define B64_NOT_BASE64(a) (((a)|0x13) == 0xF3) -static unsigned char data_ascii2bin[128]={ +static const unsigned char data_ascii2bin[128]={ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xE0,0xF0,0xFF,0xFF,0xF1,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, @@ -313,7 +313,7 @@ int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, /* There will never be more than two '=' */ } - if ((v == B64_EOF) || (n >= 64)) + if ((v == B64_EOF && (n&3) == 0) || (n >= 64)) { /* This is needed to work correctly on 64 byte input * lines. We process the line and then need to @@ -323,8 +323,8 @@ int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, if (n > 0) { v=EVP_DecodeBlock(out,d,n); - if (v < 0) { rv=0; goto end; } n=0; + if (v < 0) { rv=0; goto end; } ret+=(v-eof); } else |