diff options
author | lloyd <[email protected]> | 2007-01-08 20:43:17 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2007-01-08 20:43:17 +0000 |
commit | e6029e47754526c0cf03164d6ff9b30819e1ab2b (patch) | |
tree | c720868d3d906c1d5e9774b876620236aca36342 /src | |
parent | 0b1e07c3a16a789ecee37e2819f1740c509f7fa0 (diff) |
Fix two bugs reported by Zack Weinberg in Base64_Decoder
Diffstat (limited to 'src')
-rw-r--r-- | src/base64.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/base64.cpp b/src/base64.cpp index 9511525a6..6cfdc921e 100644 --- a/src/base64.cpp +++ b/src/base64.cpp @@ -169,13 +169,15 @@ void Base64_Decoder::decode_and_send(const byte block[], u32bit length) *************************************************/ void Base64_Decoder::handle_bad_char(byte c) { - if(checking == NONE) + if(c == '=' || checking == NONE) return; if((checking == IGNORE_WS) && Charset::is_space(c)) return; - throw Decoding_Error("Base64_Decoder: Invalid base64 character: " + c); + throw Decoding_Error( + std::string("Base64_Decoder: Invalid base64 character '") + (char)c + "'" + ); } /************************************************* |