diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-11-20 09:17:31 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-12-04 20:01:01 +0100 |
commit | cd4f7a179813ea72a67af88d509cd9b9721b5306 (patch) | |
tree | f78c4d00046ea28e0771e6e3d0c071c028385f73 /netwerk/protocol/http | |
parent | 914294e570fffa153d4100273ce9686d8939bc98 (diff) | |
download | UXP-cd4f7a179813ea72a67af88d509cd9b9721b5306.tar UXP-cd4f7a179813ea72a67af88d509cd9b9721b5306.tar.gz UXP-cd4f7a179813ea72a67af88d509cd9b9721b5306.tar.lz UXP-cd4f7a179813ea72a67af88d509cd9b9721b5306.tar.xz UXP-cd4f7a179813ea72a67af88d509cd9b9721b5306.zip |
Add a nullcheck on pipelined HTTP connections' pushback.
Diffstat (limited to 'netwerk/protocol/http')
-rw-r--r-- | netwerk/protocol/http/nsHttpPipeline.cpp | 5 |
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()) |