From: Christophe Jaillet Date: Thu, 5 May 2016 06:13:09 +0000 (+0000) Subject: Avoid a potential NULL pointer deference. X-Git-Tag: 2.5.0-alpha~1654 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5c3bafcf074bc7256586c8ffab492128927558a5;p=thirdparty%2Fapache%2Fhttpd.git Avoid a potential NULL pointer deference. Not sure this can happen, but the tests in this function handle such a case, so they should handle it correctly. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1742359 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http2/h2_mplx.c b/modules/http2/h2_mplx.c index 3ae02f4fd2e..9a840e15670 100644 --- a/modules/http2/h2_mplx.c +++ b/modules/http2/h2_mplx.c @@ -465,8 +465,10 @@ static int task_print(void *ctx, void *val) { h2_mplx *m = ctx; h2_task *task = val; - h2_stream *stream = h2_ihash_get(m->streams, task->stream_id); - if (task->request) { + + if (task && task->request) { + h2_stream *stream = h2_ihash_get(m->streams, task->stream_id); + ap_log_cerror(APLOG_MARK, APLOG_WARNING, 0, m->c, /* NO APLOGNO */ "->03198: h2_stream(%s): %s %s %s -> %s %d" "[orph=%d/started=%d/done=%d]",