On Mon, Aug 28, 2023 at 11:08 AM Jaegeuk Kim <jaeg...@kernel.org> wrote:
>
> Hi Daniel,
>
> Could you please check this?
>
> mount.c: In function ‘move_one_curseg_info’:
> mount.c:3037:9: warning: ‘memcpy’ offset [0, 3583] is out of the bounds [0, 
> 0] of object ‘buf’ with type ‘struct f2fs_summary_block’ [-Warray-bounds]
>  3037 |         memcpy(curseg->sum_blk, &buf, SUM_ENTRIES_SIZE);
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> mount.c:2998:35: note: ‘buf’ declared here
>  2998 |         struct f2fs_summary_block buf;
>       |                                   ^~~
>
This should have been a block sized buffer, but with the refactor it's
a 0 size buffer... Changing it to a char[F2FS_BLKSIZE] for v3.


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to