This is an automated email from the ASF dual-hosted git repository.
jvanderzee pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new cfb8cc20c4 Fix CID 1523641 (#11665)
cfb8cc20c4 is described below
commit cfb8cc20c4d1864334c9bcdb6ab7e7c130021db8
Author: JosiahWI <[email protected]>
AuthorDate: Tue Aug 13 06:45:27 2024 -0500
Fix CID 1523641 (#11665)
We should abort the test if `written` indicates an error, otherwise
we will call `memcmp` later with the value we didn't intend to be
negative. This is already done correctly in all the other tests.
---
src/proxy/http2/unit_tests/test_Http2Frame.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/proxy/http2/unit_tests/test_Http2Frame.cc
b/src/proxy/http2/unit_tests/test_Http2Frame.cc
index 2453ff2333..6efde5f3bd 100644
--- a/src/proxy/http2/unit_tests/test_Http2Frame.cc
+++ b/src/proxy/http2/unit_tests/test_Http2Frame.cc
@@ -41,6 +41,7 @@ TEST_CASE("Http2Frame", "[http2][Http2Frame]")
Http2PushPromiseFrame frame(id, flags, pp, hdr_block, hdr_block_len);
int64_t written = frame.write_to(miob);
+ REQUIRE(written != -1);
CHECK(written == static_cast<int64_t>(HTTP2_FRAME_HEADER_LEN +
sizeof(Http2StreamId) + hdr_block_len));
CHECK(written == miob_r->read_avail());