[icinga-checkins] icinga.org: icinga2/master: Fix crash in HttpRequest::Parse

git at icinga.org git at icinga.org
Thu Nov 17 09:08:57 CET 2016


Module: icinga2
Branch: master
Commit: f58d3a18386a03d8be1125411eb61863cd39bd60
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=f58d3a18386a03d8be1125411eb61863cd39bd60

Author: Gunnar Beutner <gunnar.beutner at icinga.com>
Date:   Thu Nov 17 09:08:22 2016 +0100

Fix crash in HttpRequest::Parse

fixes #12667

---

 lib/remote/httprequest.cpp |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/remote/httprequest.cpp b/lib/remote/httprequest.cpp
index 93ce83b..625eb90 100644
--- a/lib/remote/httprequest.cpp
+++ b/lib/remote/httprequest.cpp
@@ -38,6 +38,9 @@ HttpRequest::HttpRequest(const Stream::Ptr& stream)
 
 bool HttpRequest::Parse(StreamReadContext& src, bool may_wait)
 {
+	if (!m_Stream)
+		return false;
+
 	if (m_State != HttpRequestBody) {
 		String line;
 		StreamReadStatus srs = m_Stream->ReadLine(&line, src, may_wait);



More information about the icinga-checkins mailing list