Skip to content

Commit

Permalink
Bug 1000354: Fix comment and make test clearer (r=keeler)
Browse files Browse the repository at this point in the history
  • Loading branch information
Monica Chew committed May 7, 2014
1 parent 574be6a commit fc11076
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/mozpkix/test/gtest/pkixder_input_tests.cpp
Expand Up @@ -90,8 +90,12 @@ TEST_F(pkixder_input_tests, InputInitWithNullPointerOrZeroLength)
ASSERT_EQ(Failure, input.Init(nullptr, 100));
ASSERT_EQ(SEC_ERROR_BAD_DER, PR_GetError());

// Is this a bug?
// Though it seems odd to initialize with zero-length and non-null ptr, this
// is working as intended. The Input class was intended to protect against
// buffer overflows, and there's no risk with the current behavior. See bug
// 1000354.
ASSERT_EQ(Success, input.Init((const uint8_t*) "hello", 0));
ASSERT_TRUE(input.AtEnd());
}

TEST_F(pkixder_input_tests, InputInitWithLargeData)
Expand Down

0 comments on commit fc11076

Please sign in to comment.