summaryrefslogtreecommitdiff
path: root/fs/zonefs/super.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-06-01 17:51:08 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-06-01 17:51:08 +0200
commit1bab7eea6ecd7325ed62daecc8cd3a8f5b20f26f (patch)
treef9a23c140fe90e3959231d1f5e4b6e4e218895a3 /fs/zonefs/super.c
parent799289456aa4a482feecff17333b1113a963511b (diff)
parent18ad16ce4a6b2714583fd1e1044c6ea8e53b3519 (diff)
Merge v6.18.34linux-rolling-lts
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/zonefs/super.c')
-rw-r--r--fs/zonefs/super.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c
index 70be0b3dda49..7e345a6aa551 100644
--- a/fs/zonefs/super.c
+++ b/fs/zonefs/super.c
@@ -610,10 +610,14 @@ static long zonefs_fname_to_fno(const struct qstr *fname)
return c - '0';
for (i = 0, rname = name + len - 1; i < len; i++, rname--) {
+ long digit;
+
c = *rname;
if (!isdigit(c))
return -ENOENT;
- fno += (c - '0') * shift;
+ digit = (c - '0') * shift;
+ if (check_add_overflow(fno, digit, &fno))
+ return -ENOENT;
shift *= 10;
}