Tighten the check for integer type decoder options. Insist that the
conversion must have consumed all of the input text. Early reject specs
like "1m" or "8.0", but also unusual specs like "1 ". This shall avoid
later confusion when "seemingly accepted" specs won't take effect during
operation.
if (g_variant_is_of_type(o->def, G_VARIANT_TYPE_STRING)) {
gvar = g_variant_new_string(val_str);
} else if (g_variant_is_of_type(o->def, G_VARIANT_TYPE_INT64)) {
+ conv = NULL;
val_int = strtoll(val_str, &conv, 0);
- if (!conv || conv == val_str) {
+ if (!conv || conv == val_str || *conv) {
g_critical("Protocol decoder '%s' option '%s' "
"requires a number.", dec->name, o->id);
ret = FALSE;