zabbix: fix buffer overflow in zabbix_desegment preference
The `sizeof(bool)` is 1 byte whereas `prefs_register_bool_preference` expects a `gboolean` of size 4 bytes. Caught by ASAN at startup. Fixes: v4.1.0rc0-3228-g261c2f24cc ("Add Zabbix protocol dissector")
This commit is contained in:
parent
d138e594b5
commit
99ef0560b7
|
@ -31,7 +31,7 @@ void proto_reg_handoff_zabbix(void);
|
|||
static dissector_handle_t zabbix_handle;
|
||||
|
||||
/* Desegmentation of Zabbix protocol over TCP */
|
||||
static bool zabbix_desegment = true;
|
||||
static gboolean zabbix_desegment = true;
|
||||
|
||||
/* Initialize the protocol and registered fields */
|
||||
static int proto_zabbix = -1;
|
||||
|
@ -1090,7 +1090,7 @@ proto_register_zabbix(void)
|
|||
"Reassemble Zabbix messages spanning multiple TCP segments",
|
||||
"Whether the Zabbix protocol dissector should reassemble messages spanning multiple TCP segments."
|
||||
" To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
|
||||
(gboolean *)&zabbix_desegment);
|
||||
&zabbix_desegment);
|
||||
|
||||
zabbix_handle = register_dissector("zabbix", dissect_zabbix, proto_zabbix);
|
||||
|
||||
|
|
Loading…
Reference in New Issue