forked from osmocom/wireshark
extcap: prevent registration of wrong version.
This prevents the user to run extcap_base_set_util_info(extcap, "1", NULL, "0", NULL); that would result in version = 1.0. Change-Id: I67532459c852bdceb16693553e90da88a1043435 Reviewed-on: https://code.wireshark.org/review/16858 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
This commit is contained in:
parent
0bf1288607
commit
41e659d91e
|
@ -127,6 +127,9 @@ void extcap_base_register_interface_ext(extcap_parameters * extcap,
|
|||
void extcap_base_set_util_info(extcap_parameters * extcap, const char * major, const char * minor, const char * release, const char * helppage)
|
||||
{
|
||||
g_assert(major);
|
||||
if (!minor)
|
||||
g_assert(!release);
|
||||
|
||||
extcap->version = g_strdup_printf("%s%s%s%s%s",
|
||||
major,
|
||||
minor ? "." : "",
|
||||
|
|
Loading…
Reference in New Issue