Skip to content

Commit 5f0230d

Browse files
Donny9xiaoxiang781216
authored andcommitted
drivers/bch: fix uint32 overflow issue
Signed-off-by: dongjiuzhu1 <[email protected]>
1 parent 99df615 commit 5f0230d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/bch/bchdev_driver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ static off_t bch_seek(FAR struct file *filep, off_t offset, int whence)
245245
break;
246246

247247
case SEEK_END:
248-
newpos = bch->sectsize * bch->nsectors + offset;
248+
newpos = (off_t)bch->sectsize * bch->nsectors + offset;
249249
break;
250250

251251
default:

0 commit comments

Comments
 (0)