Merge pull request #737 from jimparis/slip-buffer-overflow-fixes
Increase fixed filename sizes in SLIP tunnels
This commit is contained in:
commit
01bd045570
3 changed files with 6 additions and 6 deletions
|
@ -65,7 +65,7 @@ void write_to_serial(int outfd, void *inbuf, int len);
|
||||||
|
|
||||||
#define USAGE_STRING "usage: tapslip6 [-B baudrate] [-s siodev] [-t tundev] ipaddress netmask"
|
#define USAGE_STRING "usage: tapslip6 [-B baudrate] [-s siodev] [-t tundev] ipaddress netmask"
|
||||||
|
|
||||||
char tundev[32] = { "tap0" };
|
char tundev[1024] = { "tap0" };
|
||||||
|
|
||||||
int
|
int
|
||||||
ssystem(const char *fmt, ...) __attribute__((__format__ (__printf__, 1, 2)));
|
ssystem(const char *fmt, ...) __attribute__((__format__ (__printf__, 1, 2)));
|
||||||
|
@ -360,7 +360,7 @@ stty_telos(int fd)
|
||||||
int
|
int
|
||||||
devopen(const char *dev, int flags)
|
devopen(const char *dev, int flags)
|
||||||
{
|
{
|
||||||
char t[32];
|
char t[1024];
|
||||||
strcpy(t, "/dev/");
|
strcpy(t, "/dev/");
|
||||||
strcat(t, dev);
|
strcat(t, dev);
|
||||||
return open(t, flags);
|
return open(t, flags);
|
||||||
|
|
|
@ -152,7 +152,7 @@ in_addr_t giaddr;
|
||||||
in_addr_t netaddr;
|
in_addr_t netaddr;
|
||||||
in_addr_t circuit_addr;
|
in_addr_t circuit_addr;
|
||||||
|
|
||||||
char tundev[32] = { "tun0" };
|
char tundev[1024] = { "tun0" };
|
||||||
|
|
||||||
struct sockaddr_in dhaddr;
|
struct sockaddr_in dhaddr;
|
||||||
int dhsock = -1;
|
int dhsock = -1;
|
||||||
|
@ -747,7 +747,7 @@ stty_telos(int fd)
|
||||||
int
|
int
|
||||||
devopen(const char *dev, int flags)
|
devopen(const char *dev, int flags)
|
||||||
{
|
{
|
||||||
char t[32];
|
char t[1024];
|
||||||
strcpy(t, "/dev/");
|
strcpy(t, "/dev/");
|
||||||
strcat(t, dev);
|
strcat(t, dev);
|
||||||
return open(t, flags);
|
return open(t, flags);
|
||||||
|
|
|
@ -74,7 +74,7 @@ void slip_send_char(int fd, unsigned char c);
|
||||||
//#define PROGRESS(s) fprintf(stderr, s)
|
//#define PROGRESS(s) fprintf(stderr, s)
|
||||||
#define PROGRESS(s) do { } while (0)
|
#define PROGRESS(s) do { } while (0)
|
||||||
|
|
||||||
char tundev[32] = { "" };
|
char tundev[1024] = { "" };
|
||||||
|
|
||||||
int
|
int
|
||||||
ssystem(const char *fmt, ...) __attribute__((__format__ (__printf__, 1, 2)));
|
ssystem(const char *fmt, ...) __attribute__((__format__ (__printf__, 1, 2)));
|
||||||
|
@ -497,7 +497,7 @@ stty_telos(int fd)
|
||||||
int
|
int
|
||||||
devopen(const char *dev, int flags)
|
devopen(const char *dev, int flags)
|
||||||
{
|
{
|
||||||
char t[32];
|
char t[1024];
|
||||||
strcpy(t, "/dev/");
|
strcpy(t, "/dev/");
|
||||||
strncat(t, dev, sizeof(t) - 5);
|
strncat(t, dev, sizeof(t) - 5);
|
||||||
return open(t, flags);
|
return open(t, flags);
|
||||||
|
|
Loading…
Reference in a new issue