fix(fatfs): fix overflowed constant issue observed in mount_volume of ff.c

This commit is contained in:
sonika.rathi
2025-08-26 13:44:25 +02:00
parent 49ae853ddb
commit b6956d7bc8

View File

@@ -3448,7 +3448,7 @@ static FRESULT mount_volume ( /* FR_OK(0): successful, !=0: an error occurred */
/* Find an FAT volume on the hosting drive */ /* Find an FAT volume on the hosting drive */
fmt = find_volume(fs, LD2PT(vol)); fmt = find_volume(fs, LD2PT(vol));
if (fmt == 4) return FR_DISK_ERR; /* An error occurred in the disk I/O layer */ if (fmt == 4 || fs->winsect == 0xFFFFFFFF) return FR_DISK_ERR; /* An error occurred in the disk I/O layer */
if (fmt >= 2) return FR_NO_FILESYSTEM; /* No FAT volume is found */ if (fmt >= 2) return FR_NO_FILESYSTEM; /* No FAT volume is found */
bsect = fs->winsect; /* Volume offset in the hosting physical drive */ bsect = fs->winsect; /* Volume offset in the hosting physical drive */