misc: Ensure consistent overflow error messages
authorLidong Chen <lidong.chen@oracle.com>
Tue, 21 Jan 2025 19:02:39 +0000 (19:02 +0000)
committerFelix Zielcke <fzielcke@z-51.de>
Thu, 3 Jul 2025 16:35:51 +0000 (18:35 +0200)
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>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name misc-Ensure-consistent-overflow-error-messages.patch

grub-core/fs/ntfs.c
grub-core/fs/ntfscomp.c
grub-core/video/readers/png.c

index bce81947cf2a204e6fa72d8257c3b44ea886ce42..b4c70a71d154016d38851e0ec0fee01bca483cff 100644 (file)
@@ -364,7 +364,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 */
index f168a318eb64146e591b079877aece89f426a4f9..b68bf5e40a9d118166f256b2237ac30b7be30120 100644 (file)
@@ -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 -
index 3163e97bfedcbb11fbe14244e921033ca53fa0be..aa7524b7dca8fd89343d3c91cde8aba5f21cfc4f 100644 (file)
@@ -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)
     {