[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SECURITY PATCH 67/73] misc: Ensure consistent overflow error messages
From: |
Daniel Kiper |
Subject: |
[SECURITY PATCH 67/73] misc: Ensure consistent overflow error messages |
Date: |
Tue, 18 Feb 2025 19:01:13 +0100 |
From: Lidong Chen <lidong.chen@oracle.com>
Update the overflow error messages to make them consistent
across the GRUB code.
Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
---
grub-core/fs/ntfs.c | 2 +-
grub-core/fs/ntfscomp.c | 2 +-
grub-core/video/readers/png.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c
index e00349b1d..960833a34 100644
--- a/grub-core/fs/ntfs.c
+++ b/grub-core/fs/ntfs.c
@@ -574,7 +574,7 @@ retry:
goto retry;
}
}
- return grub_error (GRUB_ERR_BAD_FS, "run list overflown");
+ return grub_error (GRUB_ERR_BAD_FS, "run list overflow");
}
ctx->curr_vcn = ctx->next_vcn;
ctx->next_vcn += read_run_data (run, c1, 0); /* length of current VCN */
diff --git a/grub-core/fs/ntfscomp.c b/grub-core/fs/ntfscomp.c
index f168a318e..b68bf5e40 100644
--- a/grub-core/fs/ntfscomp.c
+++ b/grub-core/fs/ntfscomp.c
@@ -30,7 +30,7 @@ static grub_err_t
decomp_nextvcn (struct grub_ntfs_comp *cc)
{
if (cc->comp_head >= cc->comp_tail)
- return grub_error (GRUB_ERR_BAD_FS, "compression block overflown");
+ return grub_error (GRUB_ERR_BAD_FS, "compression block overflow");
if (grub_disk_read
(cc->disk,
(cc->comp_table[cc->comp_head].next_lcn -
diff --git a/grub-core/video/readers/png.c b/grub-core/video/readers/png.c
index 3163e97bf..aa7524b7d 100644
--- a/grub-core/video/readers/png.c
+++ b/grub-core/video/readers/png.c
@@ -626,7 +626,7 @@ static grub_err_t
grub_png_output_byte (struct grub_png_data *data, grub_uint8_t n)
{
if (--data->raw_bytes < 0)
- return grub_error (GRUB_ERR_BAD_FILE_TYPE, "image size overflown");
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE, "image size overflow");
if (data->cur_column == 0)
{
--
2.11.0
- [SECURITY PATCH 54/73] fs: Use safe math macros to prevent overflows, (continued)
- [SECURITY PATCH 54/73] fs: Use safe math macros to prevent overflows, Daniel Kiper, 2025/02/18
- [SECURITY PATCH 58/73] fs/zfs: Prevent overflows when allocating memory for arrays, Daniel Kiper, 2025/02/18
- [SECURITY PATCH 55/73] fs: Prevent overflows when allocating memory for arrays, Daniel Kiper, 2025/02/18
- [SECURITY PATCH 57/73] fs/zfs: Use safe math macros to prevent overflows, Daniel Kiper, 2025/02/18
- [SECURITY PATCH 60/73] fs/zfs: Add missing NULL check after grub_strdup() call, Daniel Kiper, 2025/02/18
- [SECURITY PATCH 59/73] fs/zfs: Check if returned pointer for allocated memory is NULL, Daniel Kiper, 2025/02/18
- [SECURITY PATCH 64/73] fs/sfs: Check if allocated memory is NULL, Daniel Kiper, 2025/02/18
- [SECURITY PATCH 65/73] script/execute: Fix potential underflow and NULL dereference, Daniel Kiper, 2025/02/18
- [SECURITY PATCH 62/73] net: Prevent overflows when allocating memory for arrays, Daniel Kiper, 2025/02/18
- [SECURITY PATCH 66/73] osdep/unix/getroot: Fix potential underflow, Daniel Kiper, 2025/02/18
- [SECURITY PATCH 67/73] misc: Ensure consistent overflow error messages,
Daniel Kiper <=
- [SECURITY PATCH 69/73] normal/menu: Use safe math to avoid an integer overflow, Daniel Kiper, 2025/02/18
- [SECURITY PATCH 70/73] kern/partition: Add sanity check after grub_strtoul() call, Daniel Kiper, 2025/02/18
- [SECURITY PATCH 61/73] net: Use safe math macros to prevent overflows, Daniel Kiper, 2025/02/18
- [SECURITY PATCH 68/73] bus/usb/ehci: Define GRUB_EHCI_TOGGLE as grub_uint32_t, Daniel Kiper, 2025/02/18
- [SECURITY PATCH 71/73] kern/misc: Add sanity check after grub_strtoul() call, Daniel Kiper, 2025/02/18
- [SECURITY PATCH 72/73] loader/i386/linux: Cast left shift to grub_uint32_t, Daniel Kiper, 2025/02/18
- [SECURITY PATCH 73/73] loader/i386/bsd: Use safe math to avoid underflow, Daniel Kiper, 2025/02/18
- [SECURITY PATCH 63/73] net: Check if returned pointer for allocated memory is NULL, Daniel Kiper, 2025/02/18
- Re: [SECURITY PATCH 00/73] GRUB2 vulnerabilities - 2025/02/18, Tobias Powalowski, 2025/02/18