Also check the "val" parameter in rig_set_conf()

Avoids a segfault in lower level functions that can more easily
happen when using the bindings.
Simmetric with rig_get_conf() via rig_get_conf2().
pull/1790/head
Daniele Forsi IU5HKX 2025-07-27 08:39:02 +02:00
rodzic c3ec11e5f7
commit ede84bfce4
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -1477,7 +1477,7 @@ int HAMLIB_API rig_set_conf(RIG *rig, hamlib_token_t token, const char *val)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
if (!rig || !rig->caps)
if (!rig || !rig->caps || !val)
{
return -RIG_EINVAL;
}