mirror of https://github.com/wb2osz/direwolf.git
gen_packets: fix crash in send_packet
** due to improper sanitization of ax25_from_text result, ax25_pack crashes when pp is NULL
This commit is contained in:
parent
a1e2d1c3a8
commit
1c14d4b39c
|
@ -116,6 +116,12 @@ static void send_packet (char *str)
|
|||
}
|
||||
else {
|
||||
pp = ax25_from_text (str, 1);
|
||||
if (pp == NULL) {
|
||||
text_color_set(DW_COLOR_ERROR);
|
||||
dw_printf ("Failed to create frame from text.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
flen = ax25_pack (pp, fbuf);
|
||||
for (c=0; c<modem.adev[0].num_channels; c++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue