diff options
| -rw-r--r-- | extmod/vfs_fat_file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/vfs_fat_file.c b/extmod/vfs_fat_file.c index 4c38a35e5..1b2bb27f8 100644 --- a/extmod/vfs_fat_file.c +++ b/extmod/vfs_fat_file.c @@ -205,7 +205,7 @@ STATIC mp_obj_t file_open(fs_user_mount_t *vfs, const mp_obj_type_t *type, mp_ar o->fp.cltbl = temp_table; f_lseek(&o->fp, CREATE_LINKMAP); DWORD size = (temp_table[0] + 1) * 2; - o->fp.cltbl = m_malloc_maybe(size, false); + o->fp.cltbl = m_malloc_maybe(size * sizeof(DWORD), false); if (o->fp.cltbl != NULL) { o->fp.cltbl[0] = size; res = f_lseek(&o->fp, CREATE_LINKMAP); |
