Re: Too long network device names corrupts kernel

2000-11-23 Thread Michael Richardson
> "Tobias" == Tobias Ringstrom <[EMAIL PROTECTED]> writes: Tobias> Btw, does anyone know of a C function that works like strncpy, but does Tobias> add a terminating null character, event if the string does not fit, ro Tobias> does one have to do str[5]=0 first, and then strncpy(st

Too long network device names corrupts kernel

2000-11-23 Thread Tobias Ringstrom
(2.4.0-test11, but probably every version) The name member of the net_device struct is fixed to IFNAMSIZ (16) bytes, and is accessed using strcpy, strcmp and friends all over the place, which suggests that the last byte of the name must be a null character. This must be verified when the name is