kopia lustrzana https://github.com/Hamlib/Hamlib
Also check the "val" parameter in amp_set_conf() and rot_set_conf()
Avoids a segfault in lower level functions that can more easily
happen when using the bindings.
Simmetric with amp_get_conf() via amp_get_conf2() and rot_get_conf()
via rot_get_conf2().
This is a followup of commit ede84bfce4
that made the same change to conf.c
pull/1902/head
rodzic
d74581f6fe
commit
d507e815a3
|
@ -683,7 +683,7 @@ int HAMLIB_API amp_set_conf(AMP *amp, hamlib_token_t token, const char *val)
|
|||
{
|
||||
amp_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
if (!amp || !amp->caps)
|
||||
if (!amp || !amp->caps || !val)
|
||||
{
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
|
|
|
@ -748,7 +748,7 @@ int HAMLIB_API rot_set_conf(ROT *rot, hamlib_token_t token, const char *val)
|
|||
{
|
||||
rot_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
if (!rot || !rot->caps)
|
||||
if (!rot || !rot->caps || !val)
|
||||
{
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue