kopia lustrzana https://github.com/Hamlib/Hamlib
Fix potential buffer underflow in icom.c
rodzic
2706cca649
commit
6e5bc09b27
|
@ -1824,6 +1824,7 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode,
|
|||
rig_debug(RIG_DEBUG_TRACE, "%s: mode/width not changing\n", __func__);
|
||||
RETURNFUNC(RIG_OK);
|
||||
}
|
||||
|
||||
// looks like we need to change it
|
||||
|
||||
switch (mode)
|
||||
|
@ -8494,6 +8495,13 @@ int icom_decode_event(RIG *rig)
|
|||
|
||||
frm_len = retval;
|
||||
|
||||
if (frm_len < 1)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_ERR, "Unexpected frame len=%d\n", frm_len);
|
||||
RETURNFUNC(-RIG_EPROTO);
|
||||
}
|
||||
|
||||
|
||||
switch (buf[frm_len - 1])
|
||||
{
|
||||
case COL:
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#define BACKEND_VER "20210907"
|
||||
#define BACKEND_VER "20210911"
|
||||
|
||||
#define ICOM_IS_SECONDARY_VFO(vfo) ((vfo) & (RIG_VFO_B | RIG_VFO_SUB | RIG_VFO_SUB_B | RIG_VFO_MAIN_B))
|
||||
#define ICOM_GET_VFO_NUMBER(vfo) (ICOM_IS_SECONDARY_VFO(vfo) ? 0x01 : 0x00)
|
||||
|
|
Ładowanie…
Reference in New Issue