http2: avoid null pointer deref in alert output

Bug #4120.
pull/5627/head
Victor Julien 5 years ago
parent 096dce4bba
commit a8fc481cd3

@ -167,6 +167,7 @@ static void AlertJsonHttp2(const Flow *f, const uint64_t tx_id, JsonBuilder *js)
void *h2_state = FlowGetAppState(f);
if (h2_state) {
void *tx_ptr = rs_http2_state_get_tx(h2_state, tx_id);
if (tx_ptr) {
JsonBuilderMark mark = { 0, 0, 0 };
jb_get_mark(js, &mark);
jb_open_object(js, "http");
@ -176,6 +177,7 @@ static void AlertJsonHttp2(const Flow *f, const uint64_t tx_id, JsonBuilder *js)
jb_restore_mark(js, &mark);
}
}
}
return;
}

Loading…
Cancel
Save