[core] fix segfault if tempdirs fill up (fixes #2843)

(thx wolfram)

x-ref:
  "lighttpd segfault if /var/tmp is full"
  https://redmine.lighttpd.net/issues/2843
personal/stbuehler/fix-fdevent
Glenn Strauss 2017-11-26 17:03:07 -05:00
parent d3b0eb8264
commit bed3779617
1 changed files with 1 additions and 1 deletions

View File

@ -741,7 +741,7 @@ static void chunkqueue_remove_empty_chunks(chunkqueue *cq) {
chunkqueue_remove_finished_chunks(cq);
if (chunkqueue_is_empty(cq)) return;
for (c = cq->first; c->next; c = c->next) {
for (c = cq->first; c && c->next; c = c->next) {
if (0 == chunk_remaining_length(c->next)) {
chunk *empty = c->next;
c->next = empty->next;