commit | 6c20a6afd871abf5b73d6ad1315d95775af93e4e | [log] [tgz] |
---|---|---|
author | Hu Weiwen <sehuww@mail.scut.edu.cn> | Sun Feb 28 21:53:12 2021 +0800 |
committer | Gao Xiang <hsiangkao@aol.com> | Sun Feb 28 22:07:26 2021 +0800 |
tree | 5efe0f966a419eb3ef5b24924665d9386143dd7d | |
parent | c9ad0ec5f47ba42827b2c3c1af5d75e84329cb0e [diff] |
erofs-utils: fuse: fix random readlink error readlink should fill a **null-terminated** string in the buffer [1]. To achieve this: 1) memset(0) for unmapped extents; 2) make erofsfuse_read() properly returning the actual bytes read; 3) insert a null character if the path is truncated. [1] https://lore.kernel.org/r/20210121101233.GC6680@DESKTOP-N4CECTO.huww98.cn Link: https://lore.kernel.org/r/20210228135312.4373-1-hsiangkao@aol.com Reviewed-by: Li Guifu <bluce.lee@aliyun.com> Signed-off-by: Hu Weiwen <sehuww@mail.scut.edu.cn> Signed-off-by: Gao Xiang <hsiangkao@aol.com>