diff options
author | Christopher Haster <chaster@utexas.edu> | 2019-04-12 16:41:42 +0300 |
---|---|---|
committer | Christopher Haster <chaster@utexas.edu> | 2019-04-12 16:44:00 +0300 |
commit | 780ef2fce411ad58dc057db322909ba48fdb9410 (patch) | |
tree | 8b1c8dc682ad9cfb6deb680b388b4a00bc732cc7 | |
parent | 73ea008b74e7eb9eb5079b295b85f5b394e064f0 (diff) |
Fixed buffer overflow due to mistaking prog_size for cache_sizev2.0.2
found by ajaybhargav
-rw-r--r-- | lfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -29,7 +29,7 @@ static inline void lfs_cache_drop(lfs_t *lfs, lfs_cache_t *rcache) { static inline void lfs_cache_zero(lfs_t *lfs, lfs_cache_t *pcache) { // zero to avoid information leak - memset(pcache->buffer, 0xff, lfs->cfg->prog_size); + memset(pcache->buffer, 0xff, lfs->cfg->cache_size); pcache->block = 0xffffffff; } |