diff options
author | Dario Lombardo <lomato@gmail.com> | 2016-08-03 16:59:56 +0200 |
---|---|---|
committer | Roland Knall <rknall@gmail.com> | 2016-08-04 11:28:40 +0000 |
commit | 41e659d91e432f6336c9e3243b8004b3a73a15c4 (patch) | |
tree | 0eee994fce71c80a237a7145392e02bdca73d226 /extcap/extcap-base.c | |
parent | 0bf128860783da20706506f7580927c7755cb52a (diff) |
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>
Diffstat (limited to 'extcap/extcap-base.c')
-rw-r--r-- | extcap/extcap-base.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/extcap/extcap-base.c b/extcap/extcap-base.c index 837c297d6a..15a4138acc 100644 --- a/extcap/extcap-base.c +++ b/extcap/extcap-base.c @@ -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 ? "." : "", |