diff --git a/fs/romfs/fs_romfsutil.c b/fs/romfs/fs_romfsutil.c index 70f26c833e..a606bbc5bb 100644 --- a/fs/romfs/fs_romfsutil.c +++ b/fs/romfs/fs_romfsutil.c @@ -982,7 +982,7 @@ int romfs_datastart(struct romfs_mountpt_s *rm, uint32_t offset, /* Get the offset to the next chunk */ offset += 16; - if (offset >= rm->rm_volsize) + if (offset > rm->rm_volsize) { return -EIO; }