summaryrefslogtreecommitdiff
path: root/netwerk
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-11-20 09:17:31 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-11-20 09:17:31 +0100
commit57f424d078f95cfc1fbc53125976b13bac05733f (patch)
treee73a12ba9d3754a01c9574dbb6adff98bdb19285 /netwerk
parent27d8513a57ce22cf5dd1442c814e645f52755dbe (diff)
downloadaura-central-57f424d078f95cfc1fbc53125976b13bac05733f.tar.gz
Add a nullcheck on pipelined HTTP connections' pushback.
Diffstat (limited to 'netwerk')
-rw-r--r--netwerk/protocol/http/nsHttpPipeline.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/netwerk/protocol/http/nsHttpPipeline.cpp b/netwerk/protocol/http/nsHttpPipeline.cpp
index 293de8e39..4f5777244 100644
--- a/netwerk/protocol/http/nsHttpPipeline.cpp
+++ b/netwerk/protocol/http/nsHttpPipeline.cpp
@@ -291,6 +291,11 @@ nsHttpPipeline::PushBack(const char *data, uint32_t length)
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
MOZ_ASSERT(mPushBackLen == 0, "push back buffer already has data!");
+ // Some bad behaving proxies may yank the connection out from under us.
+ // Check if we still have a connection to work with.
+ if (!mConnection)
+ return NS_ERROR_FAILURE;
+
// If we have no chance for a pipeline (e.g. due to an Upgrade)
// then push this data down to original connection
if (!mConnection->IsPersistent())