Browse Source

[mod_fastcgi] fix NULL ptr deref from bugfix #2922 (fixes #2923)

(thx rgenoud)

x-ref:
  "SIGSEGV on file upload"
  https://redmine.lighttpd.net/issues/2923
personal/stbuehler/fix-fdevent
Glenn Strauss 3 years ago
parent
commit
fe3dc17968
  1. 2
      src/mod_fastcgi.c

2
src/mod_fastcgi.c

@ -187,7 +187,7 @@ static handler_t fcgi_stdin_append(server *srv, handler_ctx *hctx) {
}
fcgi_header(&(header), FCGI_STDIN, request_id, weWant, 0);
hctx->wb->first->type == MEM_CHUNK /* else FILE_CHUNK for temp file */
(chunkqueue_is_empty(hctx->wb) || hctx->wb->first->type == MEM_CHUNK) /* else FILE_CHUNK for temp file */
? chunkqueue_append_mem(hctx->wb, (const char *)&header, sizeof(header))
: chunkqueue_append_mem_min(hctx->wb, (const char *)&header, sizeof(header));
chunkqueue_steal(hctx->wb, req_cq, weWant);

Loading…
Cancel
Save