Bug found by Herb. blkcnt_t st_ex_blksize is defined as a signed value. When it is
authorJeremy Allison <jra@samba.org>
Fri, 6 Apr 2012 21:20:12 +0000 (14:20 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 6 Apr 2012 21:20:12 +0000 (14:20 -0700)
commita92c532573b293f5c0ed4a386c866bc9a3dbeef3
tree75fbd0f91fc7cd5b577244eaad44bacdd6f12c2e
parent189b3d9b24bf553ff7096397c389f20ba99e0dfa
Bug found by Herb. blkcnt_t st_ex_blksize is defined as a signed value. When it is
on a 32-bit system and defined as a long, then inside vfswrap_get_alloc_size()
we cast to a uint64_t. This sign-extends when converting to unsigned,
so if the high bit of st_ex_blksize is set we return insane values to clients.
source3/configure.in
source3/modules/vfs_default.c
source3/wscript