← Back to team overview

ubuntu-hams-devel team mailing list archive

[Bug 353219] Re: beacon crashes if the length of the destination exceeds 20

 

** Changed in: ax25-tools (Debian)
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
ham developers, which is subscribed to ax25-tools in Ubuntu.
https://bugs.launchpad.net/bugs/353219

Title:
  beacon crashes if the length of the destination exceeds 20

Status in “ax25-tools” package in Ubuntu:
  Fix Released
Status in “ax25-tools” package in Debian:
  Fix Released

Bug description:
  Binary package hint: ax25-tools

  The beacon tool crashes if the length of the -d parameter (destination
  calls and digipeater path) exceeds a length of 20 characters. This
  seems to happen because the destination path (char *destcall) is
  copied into addr (char addr[20]) without checking the length. See
  lines 106 of beacon.c:

  ...
  105	else if (destcall != NULL) 
  106		strcpy(addr, destcall);
  ...

  Checking the length of destcall before copying should solve the problem:
   
  	if (strlen(destcall) > 20) {
  		fprintf(stderr, "beacon: destination (-d) exceeds allowed length\n");
  		return 1;
  	} else
  	strcpy(addr, destcall);

  I'd also propose to increase the length of addr a little since 20
  characters seems a little few for longer pathes.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ax25-tools/+bug/353219/+subscriptions