diff options
author | beck <> | 2000-12-15 02:58:47 +0000 |
---|---|---|
committer | beck <> | 2000-12-15 02:58:47 +0000 |
commit | 9200bb13d15da4b2a23e6bc92c20e95b74aa2113 (patch) | |
tree | 5c52d628ec1e34be76e7ef2a4235d248b7c44d24 /src/lib/libcrypto/evp/encode.c | |
parent | e131d25072e3d4197ba4b9bcc0d1b27d34d6488d (diff) | |
download | openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.tar.gz openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.tar.bz2 openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.zip |
openssl-engine-0.9.6 merge
Diffstat (limited to 'src/lib/libcrypto/evp/encode.c')
-rw-r--r-- | src/lib/libcrypto/evp/encode.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/libcrypto/evp/encode.c b/src/lib/libcrypto/evp/encode.c index 14a4cb11f6..6ff9c1783c 100644 --- a/src/lib/libcrypto/evp/encode.c +++ b/src/lib/libcrypto/evp/encode.c | |||
@@ -292,7 +292,17 @@ int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, | |||
292 | /* If we are at the end of input and it looks like a | 292 | /* If we are at the end of input and it looks like a |
293 | * line, process it. */ | 293 | * line, process it. */ |
294 | if (((i+1) == inl) && (((n&3) == 0) || eof)) | 294 | if (((i+1) == inl) && (((n&3) == 0) || eof)) |
295 | { | ||
295 | v=B64_EOF; | 296 | v=B64_EOF; |
297 | /* In case things were given us in really small | ||
298 | records (so two '=' were given in separate | ||
299 | updates), eof may contain the incorrect number | ||
300 | of ending bytes to skip, so let's redo the count */ | ||
301 | eof = 0; | ||
302 | if (d[n-1] == '=') eof++; | ||
303 | if (d[n-2] == '=') eof++; | ||
304 | /* There will never be more than two '=' */ | ||
305 | } | ||
296 | 306 | ||
297 | if ((v == B64_EOF) || (n >= 64)) | 307 | if ((v == B64_EOF) || (n >= 64)) |
298 | { | 308 | { |