# # # patch "ChangeLog" # from [1ba3755df449b5d24ce976b8e0aba397c87a1ca4] # to [0955d776c91093b8260a4f2fd5fb4e1ca23c880a] # # patch "botan/base64.cpp" # from [a7780f8f856946ca1fcaf5a1fa5ee91aaf2504ce] # to [b2a556c12793e219b3a5fb74321d4aa0e03c9404] # # patch "transforms.cc" # from [3d76cc7d7a564fb292d5b579b1a2c9554572a595] # to [549477a83c7953f8df90c86ff16088f3ca7a9cab] # # patch "transforms.hh" # from [fb0db2176375756dbfb28cada6b25e030f8fd70d] # to [fc90e7e7b05c67729b91ed3fd086d09ae2945972] # ============================================================ --- ChangeLog 1ba3755df449b5d24ce976b8e0aba397c87a1ca4 +++ ChangeLog 0955d776c91093b8260a4f2fd5fb4e1ca23c880a @@ -1,3 +1,18 @@ +2007-01-09 Zack Weinberg
+ + * transforms.hh (xform): Make the generic template produce a + compile error if instantiated. Use standard declarations of + partial specializations for the usable cases of xform, not the g++ + "extern template" extension. + * transforms.cc (xform): Rewrite with a helper template and a + bunch of explicit partial specializations. Put Base64_Decoder and + Hex_Decoder into IGNORE_WS mode (i.e. garbage in their input will + now give an error) + + * botan/base64.cpp (Base64_Decoder::handle_bad_char): Always + ignore equals signs; correct generation of diagnostic message. + Patches from upstream Botan. + 2007-01-09 Matthew Gregan * database.cc: Migrate to new sqlite3_prepare_v2 API. @@ -11,7 +26,7 @@ 2007-01-06 Thomas Keller - * cmd_automate.cc: automate stdio now opens the database + * cmd_automate.cc: automate stdio now opens the database before any command is triggered, this ensures that it early checks for a correct database version ============================================================ --- botan/base64.cpp a7780f8f856946ca1fcaf5a1fa5ee91aaf2504ce +++ botan/base64.cpp b2a556c12793e219b3a5fb74321d4aa0e03c9404 @@ -172,13 +172,15 @@ void Base64_Decoder::handle_bad_char(byt *************************************************/ 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) + "'" + ); } /************************************************* ============================================================ --- transforms.cc 3d76cc7d7a564fb292d5b579b1a2c9554572a595 +++ transforms.cc 549477a83c7953f8df90c86ff16088f3ca7a9cab @@ -101,13 +101,14 @@ error_in_transform(Botan::Exception & e) I(false); // can't get here } -// the generic function -template