BIND 10 trac836, updated. 814d78a8d8866584620030437c55ce1abb1e2977 [trac836] fix &output[0] where the output vector is empty. BTW only base32hex bugs but why not fix all occurrences.
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Apr 6 14:05:15 UTC 2011
The branch, trac836 has been updated
via 814d78a8d8866584620030437c55ce1abb1e2977 (commit)
from e7d0dbd6ba745bab334aef6e747056c33f5edaa8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 814d78a8d8866584620030437c55ce1abb1e2977
Author: Francis Dupont <fdupont at isc.org>
Date: Wed Apr 6 16:02:54 2011 +0200
[trac836] fix &output[0] where the output vector is empty.
BTW only base32hex bugs but why not fix all occurrences.
-----------------------------------------------------------------------
Summary of changes:
src/lib/dns/tests/base32hex_unittest.cc | 6 +++++-
src/lib/dns/tests/base64_unittest.cc | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/dns/tests/base32hex_unittest.cc b/src/lib/dns/tests/base32hex_unittest.cc
index 253d310..b4f924a 100644
--- a/src/lib/dns/tests/base32hex_unittest.cc
+++ b/src/lib/dns/tests/base32hex_unittest.cc
@@ -66,7 +66,11 @@ decodeCheck(const string& input_string, vector<uint8_t>& output,
const string& expected)
{
decodeBase32Hex(input_string, output);
- EXPECT_EQ(expected, string(&output[0], &output[0] + output.size()));
+ if (output.size() == ) {
+ EXPECT_EQ(expected, string());
+ } else {
+ EXPECT_EQ(expected, string(&output[0], &output[0] + output.size()));
+ }
}
TEST_F(Base32HexTest, decode) {
diff --git a/src/lib/dns/tests/base64_unittest.cc b/src/lib/dns/tests/base64_unittest.cc
index 7333793..271245b 100644
--- a/src/lib/dns/tests/base64_unittest.cc
+++ b/src/lib/dns/tests/base64_unittest.cc
@@ -52,7 +52,11 @@ decodeCheck(const string& input_string, vector<uint8_t>& output,
const string& expected)
{
decodeBase64(input_string, output);
- EXPECT_EQ(expected, string(&output[0], &output[0] + output.size()));
+ if (output.size() == ) {
+ EXPECT_EQ(expected, string());
+ } else {
+ EXPECT_EQ(expected, string(&output[0], &output[0] + output.size()));
+ }
}
TEST_F(Base64Test, decode) {
More information about the bind10-changes
mailing list