mirror of
https://github.com/Hamlib/Hamlib.git
synced 2024-09-21 10:27:18 +00:00
Add ROT_MODEL_SPID_ROT1PROG to priv allocation in spid.c -- fixes potential segfaults
This commit is contained in:
parent
4aff005665
commit
6e0aa59cc2
@ -198,6 +198,7 @@ static int spid_rot_init(ROT *rot)
|
||||
}
|
||||
|
||||
if (rot->caps->rot_model == ROT_MODEL_SPID_ROT2PROG ||
|
||||
rot->caps->rot_model == ROT_MODEL_SPID_ROT1PROG ||
|
||||
rot->caps->rot_model == ROT_MODEL_SPID_MD01_ROT2PROG)
|
||||
{
|
||||
struct spid_rot2prog_priv_data *priv;
|
||||
@ -216,6 +217,10 @@ static int spid_rot_init(ROT *rot)
|
||||
priv->el_resolution = 0;
|
||||
priv->dir = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: Unknown SPID model=%s\n", __func__, rot->caps->model_name);
|
||||
}
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user