Skip to content

Commit

Permalink
Update tuntap_linux.c
Browse files Browse the repository at this point in the history
fix [sh] overflow in OpenWRT
  • Loading branch information
wsch32 committed Aug 8, 2018
1 parent fa69c70 commit 833a58b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion n2n_v2/tuntap_linux.c
Expand Up @@ -147,7 +147,7 @@ void tuntap_get_address(struct tuntap_dev *tuntap)
snprintf( buf, sizeof(buf), "/sbin/ifconfig %s | /bin/sed -e '/inet addr:/!d' -e 's/^.*inet addr://' -e 's/ .*$//'",
tuntap->dev_name );
fp=popen(buf, "r");
if (fp )
if (fp)
{
memset(buf,0,N2N_LINUX_SYSTEMCMD_SIZE); /* make sure buf is NULL terminated. */
fread(buf, 1, 15, fp);
Expand Down

0 comments on commit 833a58b

Please sign in to comment.