diff options
| author | hibby <hibby@pingu> | 2019-08-17 22:35:52 +0100 |
|---|---|---|
| committer | hibby <hibby@pingu> | 2019-08-17 22:35:52 +0100 |
| commit | 85023698ac134abe2d522209960da0c6acb5a89b (patch) | |
| tree | 1d357869d2b1e0672b31d35c856eeffbbd48d98f /command.c | |
| parent | c63e53bba9cfde78d3891edd33d91dd0a3b74f0c (diff) | |
| parent | d2b74b1d3f315da06d99a39eb282176c5b0ae8b3 (diff) | |
Update upstream source from tag 'upstream/2.10'
Update to upstream version '2.10'
with Debian dir 2a72aea161a115b76016417d380133c45f0d7df8
Diffstat (limited to 'command.c')
| -rw-r--r-- | command.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -395,7 +395,9 @@ int do_ports(int argc, char **argv) n=0; if (ax_list) for (ax=ax_list;ax!=NULL;ax=ax->next) { // if (strcmp(ax25_config_get_name(ax->dev), cp)==0 && strcmp(ax->dest_addr, "*")!=0) n++; - if (strcmp(ax->dest_addr, "*")!=0 && strcmp(ax25_config_get_name(ax->dev), cp)==0) n++; + /* Fixed a possible exception error if the port count returns NULL + in libc for strcmp - Marius YO2LOJ */ + if (strcmp(ax->dest_addr, "*")!=0 && ax25_config_get_name(ax->dev) && strcmp(ax25_config_get_name(ax->dev), cp)==0) n++; } tx=0; rx=0; if (dev_list) for (dev=dev_list;dev!=NULL;dev=dev->next) { @@ -448,6 +450,9 @@ int do_sessions(int argc, char **argv) if ((argc < 2) && !strcmp(ax_p->dest_addr, "*")) continue; cp = ax25_config_get_name(ax_p->dev); + /* under some conditions ax25_config_get_name(dev) could return a null + pointer - Marius YO2LOJ */ + if(!cp) continue; axio_printf(NodeIo,"%-7s %-9s %-9s ", cp, ax_p->dest_addr, ax_p->src_addr); if (!strcmp(ax_p->dest_addr, "*")) { axio_printf(NodeIo,"Listening\n"); |
