]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
e2fsck: when mutating file name make sure its length never exceeds 255
authorTheodore Ts'o <tytso@mit.edu>
Fri, 12 Aug 2022 02:16:41 +0000 (22:16 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 12 Aug 2022 02:25:11 +0000 (22:25 -0400)
commit1bd16e790308f92e89a5dfbd40ab9e164fe88aa9
tree154f1a4091e2e589c2dd2cd56c21cbcdbce7a6d5
parent6b3edcd191c20b3fb108f0d7564aaa930035d0ab
e2fsck: when mutating file name make sure its length never exceeds 255

E2fsck will attempt to mutate filenames to ensure uniqueness if
necessary.  If there are two unique filenames that are 254 or 255
characters in length and do not contain the '~' character, the
mutate_name() function would create a filename which is 256 bytes
long, which is not a legal filename in Linux.  Adjust the mutate_name
function to avoid this possibility.

Addresses-Coverity-Bug: 1500768
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/rehash.c