diff options
author | Tobias Engel <t-openbsc@tobias.org> | 2012-11-05 13:03:15 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2012-11-05 13:31:25 +0100 |
commit | 3d7500e68640f4914b358dee3dcbd2cba97b8679 (patch) | |
tree | dac9149b780e4199c0f753a5a0c0c736453cf156 | |
parent | f4594e236b07801f80121192df0ee1fa7958bc71 (diff) |
Remove out-of-bounds write
This removes an out-of-bounds write. The whole statement can simply be
removed since snprintf already adds the trailing 0 byte.
-rw-r--r-- | lib/tun.c | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -677,7 +677,6 @@ int tun_new(struct tun_t **tun) /* Find suitable device */ for (devnum = 0; devnum < 255; devnum++) { /* TODO 255 */ snprintf(devname, sizeof(devname), "/dev/tun%d", devnum); - devname[sizeof(devname)] = 0; if (((*tun)->fd = open(devname, O_RDWR)) >= 0) break; if (errno != EBUSY) |