summaryrefslogtreecommitdiffstats
path: root/fs/sysv/inode.c
diff options
context:
space:
mode:
authorMitchell Blank Jr <mitch@sfgoth.com>2006-04-10 22:54:08 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-11 06:18:41 -0700
commitb04eb6aa08ecc3e24df2f78ebc486011ebd74feb (patch)
tree8dbf6a2449f886f0db9c3082dabdf83d4c4f04f7 /fs/sysv/inode.c
parenta9cdf410ca8f59b52bc7061a6751050010c7cc5b (diff)
downloadop-kernel-dev-b04eb6aa08ecc3e24df2f78ebc486011ebd74feb.zip
op-kernel-dev-b04eb6aa08ecc3e24df2f78ebc486011ebd74feb.tar.gz
[PATCH] select: don't overflow if (SELECT_STACK_ALLOC % sizeof(long) != 0)
If SELECT_STACK_ALLOC is not a multiple of sizeof(long) then stack_fds[] would be shorter than SELECT_STACK_ALLOC bytes and could overflow later in the function. Fixed by simply rearranging the test later to work on sizeof(stack_fds) Currently SELECT_STACK_ALLOC is 256 so this doesn't happen, but it's nasty to have things like this hidden in the code. What if later someone decides to change SELECT_STACK_ALLOC to 300? Signed-off-by: Mitchell Blank Jr <mitch@sfgoth.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/sysv/inode.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud