summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-wm8350.c
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-06-12 16:02:27 +0200
committerDavid S. Miller <davem@davemloft.net>2013-06-13 01:38:36 -0700
commit2dc85bf323515e59e15dfa858d1472bb25cad0fe (patch)
tree48d2bb80d960a20a12ebb2b5108c3e589605e26b /drivers/rtc/rtc-wm8350.c
parent631f24a2febb228f82604dc5330091e8080cd8ae (diff)
downloadlinux-3.10-2dc85bf323515e59e15dfa858d1472bb25cad0fe.tar.gz
linux-3.10-2dc85bf323515e59e15dfa858d1472bb25cad0fe.tar.bz2
linux-3.10-2dc85bf323515e59e15dfa858d1472bb25cad0fe.zip
packet: packet_getname_spkt: make sure string is always 0-terminated
uaddr->sa_data is exactly of size 14, which is hard-coded here and passed as a size argument to strncpy(). A device name can be of size IFNAMSIZ (== 16), meaning we might leave the destination string unterminated. Thus, use strlcpy() and also sizeof() while we're at it. We need to memset the data area beforehand, since strlcpy does not padd the remaining buffer with zeroes for user space, so that we do not possibly leak anything. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/rtc/rtc-wm8350.c')
0 files changed, 0 insertions, 0 deletions