off-by-one error in sbin/atm

From: Roman Divacky <rdivacky_at_freebsd.org>
Date: Sat, 14 Apr 2007 17:42:42 +0200
hi

in /usr/src/sbin/atm/atmconfig/diag.c on line 871 there's
off-by-one error. array of size IFNAMSIZ is being written
on IFNAMSIZ, ie. one byte after the array. 

this code
        ifr.ifr_name[IFNAMSIZ] = '\0';
should be
        ifr.ifr_name[IFNAMSIZ-1] = '\0';

thnx for fixing it :)

roman
Received on Sat Apr 14 2007 - 13:42:46 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:08 UTC