MCPcopy Create free account
hub / github.com/Hamlib/Hamlib / check_buffer_overflow

Function check_buffer_overflow

src/sprintflst.c:42–52  ·  view source on GitHub ↗

just doing a warning message for now eventually should make this -RIG_EINTERNAL

Source from the content-addressed store, hash-verified

40// just doing a warning message for now
41// eventually should make this -RIG_EINTERNAL
42static int check_buffer_overflow(char *str, int len, int nlen)
43{
44 if (len + 32 >= nlen) // make sure at least 32 bytes are available
45 {
46 rig_debug(RIG_DEBUG_ERR,
47 "%s: buffer overflow, len=%d, nlen=%d, str='%s', len+32 must be >= nlen\n",
48 __func__, len, nlen, str);
49 }
50
51 return RIG_OK;
52}
53
54int rig_sprintf_vfo(char *str, int nlen, vfo_t vfo)
55{

Callers 14

rig_sprintf_modeFunction · 0.85
rig_sprintf_funcFunction · 0.85
rot_sprintf_funcFunction · 0.85
rig_sprintf_levelFunction · 0.85
rot_sprintf_levelFunction · 0.85
amp_sprintf_levelFunction · 0.85
sprintf_level_extFunction · 0.85
rig_sprintf_parmFunction · 0.85
rig_sprintf_vfopFunction · 0.85
rig_sprintf_scanFunction · 0.85

Calls 1

rig_debugFunction · 0.85

Tested by

no test coverage detected