Fix expected BLKGETSIZE64 ioctl result type to 64 bit

The BLKGETSIZE64 ioctl writes 64 bit to the destination address.
In the current implementation the destination pointer is set as u_long,
that is only fine for 64 bit architectures.  In 32 bit architectures
u_long is a 32 bit unsigned and might cause the kernel to overwrite
neighbor elements in the stack, leading to unexpected results.

Fix by forcing the destination variable type to 64 bit.

Bug: 180318855
Test: formatted SD card
Change-Id: Ie13a5bae0db61356554340f45ee0bd89d71862fa
Signed-off-by: Alessio Balsini <balsini@google.com>
1 file changed