Skip to content

Fix crash in gen_packets #273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gen_packets: fix crash in send_packet
** due to improper sanitization of ax25_from_text result, ax25_pack crashes when pp is NULL
  • Loading branch information
Alexandra Sandulescu committed May 18, 2020
commit 1c14d4b39c572bda858c560e601d9313e6898ae4
6 changes: 6 additions & 0 deletions gen_packets.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
{
Expand Down