kopia lustrzana https://github.com/Hamlib/Hamlib
Patch from Eric Sesterhenn, after cppcheck run:
- kenwood/ic10.c: (error) Buffer access out-of-bounds - src/network.c: (error) Memory leak: p - tentec/paragon.c: (error) Memory leak: priv git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2765 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.2.11
rodzic
3949e8f8ee
commit
581359dca0
|
@ -441,7 +441,7 @@ int ic10_get_mem(RIG *rig, vfo_t vfo, int *ch)
|
|||
*/
|
||||
int ic10_set_mem(RIG *rig, vfo_t vfo, int ch)
|
||||
{
|
||||
char membuf[4], ackbuf[16];
|
||||
char membuf[8], ackbuf[16];
|
||||
int mem_len, ack_len, retval;
|
||||
|
||||
mem_len = sprintf(membuf, "MC %02d;", ch);
|
||||
|
|
|
@ -90,12 +90,14 @@ static int getaddrinfo(const char *node, const char *service,
|
|||
{
|
||||
struct addrinfo *p;
|
||||
|
||||
p = malloc(sizeof(struct addrinfo));
|
||||
if (!p)
|
||||
return ENOMEM;
|
||||
/* limitation: this replacement function only for IPv4 */
|
||||
if (hints && hints->ai_family != AF_INET)
|
||||
return EINVAL;
|
||||
|
||||
p = malloc(sizeof(struct addrinfo));
|
||||
if (!p)
|
||||
return ENOMEM;
|
||||
|
||||
memset(p, 0, sizeof(struct addrinfo));
|
||||
p->ai_family = hints->ai_family;
|
||||
p->ai_socktype = hints->ai_socktype;
|
||||
|
|
|
@ -191,6 +191,7 @@ int tt585_init(RIG *rig)
|
|||
|
||||
memset(priv, 0, sizeof(struct tt585_priv_data));
|
||||
|
||||
rig->state.priv = priv;
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue