Re: [PATCH 3/5] btrfs: Fix possible off-by-one in btrfs_search_path_in_tree

2017-12-06 Thread David Sterba
On Fri, Dec 01, 2017 at 11:19:42AM +0200, Nikolay Borisov wrote: > The name char array passed to btrfs_search_path_in_tree is of size > BTRFS_INO_LOOKUP_PATH_MAX (4080). So the actual accessible char indexes > are in the range of [0, 4079]. Currently the code uses the define but this > represents

[PATCH 3/5] btrfs: Fix possible off-by-one in btrfs_search_path_in_tree

2017-12-01 Thread Nikolay Borisov
The name char array passed to btrfs_search_path_in_tree is of size BTRFS_INO_LOOKUP_PATH_MAX (4080). So the actual accessible char indexes are in the range of [0, 4079]. Currently the code uses the define but this represents an off-by-one. Signed-off-by: Nikolay Borisov ---