]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
isofs: support full length file names (255 instead of 253)
authorShawn Landden <slandden@gmail.com>
Tue, 27 Jan 2026 17:05:52 +0000 (09:05 -0800)
committerJan Kara <jack@suse.cz>
Wed, 28 Jan 2026 08:49:14 +0000 (09:49 +0100)
Linux file names are in principle limited only to PATH_MAX (which is
4096) but the code in get_rock_ridge_filename() limits them to 253
characters.

As mentioned by Jan Kara, the Rockridge standard to ECMA119/ISO9660 has
no limit of file name length, but this limits file names to the
traditional 255 NAME_MAX value.

Signed-off-by: Shawn Landden <slandden@gmail.com>
Link: https://patch.msgid.link/CA+49okq0ouJvAx0=txR_gyNKtZj55p3Zw4MB8jXZsGr4bEGjRA@mail.gmail.com
Signed-off-by: Jan Kara <jack@suse.cz>
fs/isofs/rock.c

index 576498245b9d7c7378ef0c1555ec63440daa51e7..6fe6dbd0c740f7c739cf9de6ee68cb3bfc552e21 100644 (file)
@@ -271,7 +271,7 @@ repeat:
                                break;
                        }
                        len = rr->len - 5;
-                       if (retnamlen + len >= 254) {
+                       if (retnamlen + len > NAME_MAX) {
                                truncate = 1;
                                break;
                        }