]> git.proxmox.com Git - mirror_lxc.git/commit
coverity: ifr_name buffer not NULL terminated
authorDwight Engen <dwight.engen@oracle.com>
Tue, 29 Oct 2013 13:24:29 +0000 (09:24 -0400)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Tue, 29 Oct 2013 14:38:50 +0000 (09:38 -0500)
commit5da6aa8c717f11f99a1e169cb5df47db7656f662
tree78012666a44c10cc763e782adeeec90c22c31377
parente853a32df142fe3cee161e03b00ffb229714fadb
coverity: ifr_name buffer not NULL terminated

The kernel (net/core/dev_ioctl.c:dev_ioctl()) is going to NULL terminate
this name after the copy-in of the ifr, so even though this is a fixed
sized array the last byte isn't usable as part of the name. All the ioctls
we're using go through this code path.

Use the ifr name in the DEBUG message in case it was possibly truncated.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/conf.c
src/lxc/lxc_user_nic.c
src/lxc/network.c