summaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorJesper Juhl <jj@chaosbits.net>2012-07-22 11:37:20 +0000
committerDavid S. Miller <davem@davemloft.net>2012-07-22 17:50:49 -0700
commit818810472b129004c16fc51bf0a570b60776bfb7 (patch)
tree132cc06300eee66d5e29905a652e79bf585416f6 /net/sctp
parent5e9965c15ba88319500284e590733f4a4629a288 (diff)
downloadop-kernel-dev-818810472b129004c16fc51bf0a570b60776bfb7.zip
op-kernel-dev-818810472b129004c16fc51bf0a570b60776bfb7.tar.gz
net: Fix references to out-of-scope variables in put_cmsg_compat()
In net/compat.c::put_cmsg_compat() we may assign 'data' the address of either the 'ctv' or 'cts' local variables inside the 'if (!COMPAT_USE_64BIT_TIME)' branch. Those variables go out of scope at the end of the 'if' statement, so when we use 'data' further down in 'copy_to_user(CMSG_COMPAT_DATA(cm), data, cmlen - sizeof(struct compat_cmsghdr))' there's no telling what it may be refering to - not good. Fix the problem by simply giving 'ctv' and 'cts' function scope. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud