Add ROT_MODEL_SPID_ROT1PROG to priv allocation in spid.c -- fixes potential segfaults

This commit is contained in:
Mike Black W9MDB 2024-08-16 06:54:15 -05:00
parent 4aff005665
commit 6e0aa59cc2

View File

@ -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;
}