]> dgit.raspbian.org Git - grub2.git/commit
fs/jfs: Inconsistent signed/unsigned types usage in return values
authorLidong Chen <lidong.chen@oracle.com>
Mon, 16 Dec 2024 20:22:40 +0000 (20:22 +0000)
committerAurelien Jarno <aurel32@debian.org>
Thu, 30 Apr 2026 19:02:01 +0000 (21:02 +0200)
commitf0b9ea5d5fa25903f2083b564c73496472b2a5db
tree87a1d84678c802b6c94c85c31d734a2169614662
parentc81623665b31a6697eb319b2e325ea97300a6e7c
fs/jfs: Inconsistent signed/unsigned types usage in return values

The getblk() returns a value of type grub_int64_t which is assigned to
iagblk and inoblk, both of type grub_uint64_t, in grub_jfs_read_inode()
via grub_jfs_blkno(). This patch fixes the type mismatch in the
functions. Additionally, the getblk() will return 0 instead of -1 on
failure cases. This change is safe because grub_errno is always set in
getblk() to indicate errors and it is later checked in the callers.

Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
Reviewed-by: Alec Brown <alec.r.brown@oracle.com>
Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name fs-jfs-Inconsistent-signed-unsigned-types-usage-in-return.patch
grub-core/fs/jfs.c