Commit 0ab52b0c authored by Robert O'Callahan's avatar Robert O'Callahan Committed by Bernhard Link

Fix off-by-one error in event type check

parent 566c48cb
......@@ -1748,7 +1748,7 @@ static inline void print_generic_event(struct connection *c, const unsigned char
return;
}
fprintf(out, "%s(%hhu) ", extension->name, opcode);
if( evtype > extension->numxgevents
if( evtype >= extension->numxgevents
|| extension->xgevents[evtype].name == NULL ) {
fprintf(out, "unknown(%hu) ", evtype);
print_parameters(c, buffer, len,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment