[mod_fastcgi] next try to fix use after free

personal/stbuehler/wip
Stefan Bühler 9 years ago
parent bb018b091a
commit 42b49307b9
  1. 5
      src/modules/fastcgi_stream.c

@ -660,7 +660,6 @@ static void fastcgi_decode(liFastCGIBackendContext *ctx) {
fcgi_debug("fastcgi end request: %i\n", appStatus);
callbacks->end_request_cb(ctx->currentcon->vr, &ctx->pool->public, &ctx->currentcon->public, appStatus);
if (NULL == ctx->iostream->stream_in.out) return;
}
}
break;
@ -722,7 +721,7 @@ static void fastcgi_decode(liFastCGIBackendContext *ctx) {
}
}
if (0 == in->length || ctx->remainingContent > 0) return;
if (NULL == ctx->iostream || 0 == in->length || ctx->remainingContent > 0) break;
if (ctx->remainingPadding > 0) {
int len = li_chunkqueue_skip(in, ctx->remainingPadding);
@ -730,7 +729,7 @@ static void fastcgi_decode(liFastCGIBackendContext *ctx) {
}
}
if (in->is_closed && !ctx->request_done) {
if (NULL != ctx->iostream && (in->is_closed && !ctx->request_done)) {
if (0 != in->length || !ctx->stdout_closed) {
fastcgi_reset(ctx);
} else {

Loading…
Cancel
Save