diff options
Diffstat (limited to '')
| -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 | { |
