diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2019-02-04 13:39:51 -0800 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2019-02-04 13:39:51 -0800 |
| commit | b249243a9f8d6ed246b0b873fe606066a6d712ed (patch) | |
| tree | 977ccc7335abd9db4e62c71ed73394e427fe72f0 | |
| parent | 90e596470336aa45a44dcbdf2ab9dfd254b9ab79 (diff) | |
Fix allocation size
| -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); |
