Created
May 20, 2013 20:36
-
-
Save isaacs/5615305 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/string_bytes.cc b/src/string_bytes.cc | |
index 5bf0a30..d68e3bc 100644 | |
--- a/src/string_bytes.cc | |
+++ b/src/string_bytes.cc | |
@@ -63,8 +63,6 @@ static inline size_t base64_decoded_size_fast(size_t size) { | |
} | |
static inline size_t base64_decoded_size(const char* src, size_t size) { | |
- size = base64_decoded_size_fast(size); | |
- | |
const char* end = src + size; | |
// check for trailing padding (1 or 2 bytes) | |
if (size > 0) { | |
@@ -72,6 +70,8 @@ static inline size_t base64_decoded_size(const char* src, size_t size) { | |
if (size > 0 && end[-2] == '=') size--; | |
} | |
+ size = base64_decoded_size_fast(size); | |
+ | |
return size; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment