jerpelea opened a new pull request, #19622:
URL: https://github.com/apache/nuttx/pull/19622

   ## Summary
   
   This change fixes a divide-by-zero in stat() caused by overflow of 
st_blksize when a filesystem reports a block size larger than can be 
represented by blksize_t. As reported in #19432, this can occur with LittleFS 
configurations using large block sizes, where blksize_t is currently defined as 
int16_t. When the filesystem block size exceeds the range of int16_t, 
st_blksize is truncated to zero, causing an integer divide-by-zero when 
st_blocks is calculated.
   
   This patch widens blksize_t from int16_t to int32_t in include/sys/types.h 
and updates the corresponding nuttx_blksize_t definition in 
include/nuttx/fs/hostfs.h so the two definitions remain consistent.
   
   Fixes #19432
   
   Includes:
   https://github.com/apache/nuttx/pull/19179
   
   ## Impact
   
   RELEASE
   
   ## Testing
   
   CI


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to