Increase fixed filename sizes in SLIP tunnels

Long serial port names like
  /dev/serial/by-id/usb-FTDI_FT230X_Basic_UART_DN0038W8-if00-port0
cause crashes.  This is the simplest fix to avoid the problem.
This commit is contained in:
Jim Paris 2014-06-27 19:48:41 -04:00
parent b5f37e856c
commit 21b78de088
3 changed files with 6 additions and 6 deletions

View file

@ -152,7 +152,7 @@ in_addr_t giaddr;
in_addr_t netaddr;
in_addr_t circuit_addr;
char tundev[32] = { "tun0" };
char tundev[1024] = { "tun0" };
struct sockaddr_in dhaddr;
int dhsock = -1;
@ -747,7 +747,7 @@ stty_telos(int fd)
int
devopen(const char *dev, int flags)
{
char t[32];
char t[1024];
strcpy(t, "/dev/");
strcat(t, dev);
return open(t, flags);