summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9>2015-12-19 08:28:39 +0000
committerstbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9>2015-12-19 08:28:39 +0000
commit156e838ca5622d7c8e46335d8b09eac034cacb8e (patch)
tree96726de02caee292f85c5249c7d38b026632a765
parent24f36152b14ef14b907a69bac7f732b4746c272a (diff)
downloadlighttpd-156e838ca5622d7c8e46335d8b09eac034cacb8e.tar.gz
[chunk] fix use after free / double free (fixes #2700)
From: Stefan Bühler <stbuehler@web.de> git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3065 152afb58-edef-0310-8abb-c4023f1b3aa9
-rw-r--r--NEWS1
-rw-r--r--src/chunk.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 6dd33d30..102d6383 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ NEWS
- 1.4.39
* [core] fix memset_s call (fixes #2698)
+ * [chunk] fix use after free / double free (fixes #2700)
- 1.4.38 - 2015-12-05
* [stat-cache] fix handling of collisions, might have returned wrong data (fixes #2669)
diff --git a/src/chunk.c b/src/chunk.c
index c140ad21..14cf6480 100644
--- a/src/chunk.c
+++ b/src/chunk.c
@@ -172,6 +172,7 @@ static void chunkqueue_prepend_chunk(chunkqueue *cq, chunk *c) {
}
static void chunkqueue_append_chunk(chunkqueue *cq, chunk *c) {
+ c->next = NULL;
if (cq->last) {
cq->last->next = c;
}