Problem Description:
I am encountering an issue when using esp_littlefs to mount and interact with a 16GB SDHC card (SD16G). Specifically, the total_bytes calculation within the get_total_and_used_bytes results in a size_t overflow when performing the sector_size * capacity operation.
16GB SDHC card with the following characteristics:
Name: SD16G
Type: SDHC
Speed: 20.00 MHz (limit: 20.00 MHz)
Size: 14792MB
CSD: ver=2, sector_size=512, capacity=30294016 read_bl_len=9
Expected Behavior:
The littlefs_get_total_bytes function should accurately return the total capacity of the SD card (approximately 14.7GB).
Problem Description:
I am encountering an issue when using esp_littlefs to mount and interact with a 16GB SDHC card (SD16G). Specifically, the total_bytes calculation within the get_total_and_used_bytes results in a size_t overflow when performing the sector_size * capacity operation.
16GB SDHC card with the following characteristics:
Name: SD16G
Type: SDHC
Speed: 20.00 MHz (limit: 20.00 MHz)
Size: 14792MB
CSD: ver=2, sector_size=512, capacity=30294016 read_bl_len=9
Expected Behavior:
The littlefs_get_total_bytes function should accurately return the total capacity of the SD card (approximately 14.7GB).