On Tue, Feb 11, 2020 at 03:57:21PM -0300, Marcos Paulo de Souza wrote: > > We received a build report from the 0day bot when building with clang > > that appears legitimate if I am reading everything correctly. > > > > ../fs/btrfs/ioctl.c:2867:4: warning: array index 4087 is past the end > > of the array (which contains 4040 elements) [-Warray-bounds] > > vol_args2->name[BTRFS_PATH_NAME_MAX] = '\0'; > > ^ ~~~~~~~~~~~~~~~~~~~ > > ../include/uapi/linux/btrfs.h:125:3: note: array 'name' declared here > > char name[BTRFS_SUBVOL_NAME_MAX + 1]; > > ^ > > 1 warning generated. > > Sure, I will send a new patch to address this warning after this one > gets merged, since this problem existed before this change. Thanks for > the report! Actually the warning is correct because you used a different macro: BTRFS_PATH_NAME_MAX (4087) instead of BTRFS_SUBVOL_NAME_MAX (4039).
