From 2e4e73d8d3cb0c366ef530541b9ea4d58c85dc77 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Wed, 17 Aug 2016 12:44:16 +0200 Subject: [PATCH] HTTP/2 - fix invalid read (auto-test) Since headersFrame is a reference to a vector's element, clearing this vector before accessing headersFrame.flags is not a good idea, must be done later. Change-Id: I80eee0761ac1cad580e979be9371ec7588a694ac Reviewed-by: Edward Welbourne --- tests/auto/network/access/http2/http2srv.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/network/access/http2/http2srv.cpp b/tests/auto/network/access/http2/http2srv.cpp index 9bc7c38875..18a41cb2c0 100644 --- a/tests/auto/network/access/http2/http2srv.cpp +++ b/tests/auto/network/access/http2/http2srv.cpp @@ -625,12 +625,12 @@ void Http2Server::processRequest() return; } - continuedRequest.clear(); // Actually, if needed, we can do a comparison here. activeRequests[streamID] = decoder.decodedHeader(); if (headersFrame.flags.testFlag(FrameFlag::END_STREAM)) emit receivedRequest(streamID); // else - we're waiting for incoming DATA frames ... + continuedRequest.clear(); } QT_END_NAMESPACE