[Toybox] [PATCH] Fix get_block_device_size() for linux
    enh 
    enh at google.com
       
    Thu Mar 12 09:04:45 PDT 2020
    
    
  
We were incorrectly passing a pointer to a pointer of an
unsigned long long, when we just wanted to pass a pointer
to the unsigned long long.  This is especially bad on 32-bit
systems, where we're then writing a 64-bits into a 32-bit value
within ioctl.
We fix this to pass a pointer to the unsigned long long.
Test: On 32-bit device, no longer see native crash from toybox
Bug: http://b/151311535
Signed-off-by: Greg Kaiser <gkaiser at google.com>
---
 lib/portability.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-get_block_device_size-for-linux.patch
Type: text/x-patch
Size: 1171 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20200312/624c7747/attachment-0002.bin>
    
    
More information about the Toybox
mailing list