off-by-one error in sbin/atm

Roman Divacky rdivacky at freebsd.org
Sat Apr 14 15:42:46 UTC 2007


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



More information about the freebsd-current mailing list