0062-misc-Ensure-consistent-overflow-error-messages.patch 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. From 3a844f1139dd6fdcc90278239c8f6ea43aad9f2e Mon Sep 17 00:00:00 2001
  2. From: Lidong Chen <lidong.chen@oracle.com>
  3. Date: Tue, 21 Jan 2025 19:02:39 +0000
  4. Subject: [PATCH] misc: Ensure consistent overflow error messages
  5. Update the overflow error messages to make them consistent
  6. across the GRUB code.
  7. Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
  8. Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
  9. Upstream: f8795cde217e21539c2f236bcbb1a4bf521086b3
  10. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
  11. ---
  12. grub-core/fs/ntfs.c | 2 +-
  13. grub-core/fs/ntfscomp.c | 2 +-
  14. grub-core/video/readers/png.c | 2 +-
  15. 3 files changed, 3 insertions(+), 3 deletions(-)
  16. diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c
  17. index bce81947c..b4c70a71d 100644
  18. --- a/grub-core/fs/ntfs.c
  19. +++ b/grub-core/fs/ntfs.c
  20. @@ -364,7 +364,7 @@ retry:
  21. goto retry;
  22. }
  23. }
  24. - return grub_error (GRUB_ERR_BAD_FS, "run list overflown");
  25. + return grub_error (GRUB_ERR_BAD_FS, "run list overflow");
  26. }
  27. ctx->curr_vcn = ctx->next_vcn;
  28. ctx->next_vcn += read_run_data (run, c1, 0); /* length of current VCN */
  29. diff --git a/grub-core/fs/ntfscomp.c b/grub-core/fs/ntfscomp.c
  30. index f168a318e..b68bf5e40 100644
  31. --- a/grub-core/fs/ntfscomp.c
  32. +++ b/grub-core/fs/ntfscomp.c
  33. @@ -30,7 +30,7 @@ static grub_err_t
  34. decomp_nextvcn (struct grub_ntfs_comp *cc)
  35. {
  36. if (cc->comp_head >= cc->comp_tail)
  37. - return grub_error (GRUB_ERR_BAD_FS, "compression block overflown");
  38. + return grub_error (GRUB_ERR_BAD_FS, "compression block overflow");
  39. if (grub_disk_read
  40. (cc->disk,
  41. (cc->comp_table[cc->comp_head].next_lcn -
  42. diff --git a/grub-core/video/readers/png.c b/grub-core/video/readers/png.c
  43. index 3163e97bf..aa7524b7d 100644
  44. --- a/grub-core/video/readers/png.c
  45. +++ b/grub-core/video/readers/png.c
  46. @@ -626,7 +626,7 @@ static grub_err_t
  47. grub_png_output_byte (struct grub_png_data *data, grub_uint8_t n)
  48. {
  49. if (--data->raw_bytes < 0)
  50. - return grub_error (GRUB_ERR_BAD_FILE_TYPE, "image size overflown");
  51. + return grub_error (GRUB_ERR_BAD_FILE_TYPE, "image size overflow");
  52. if (data->cur_column == 0)
  53. {
  54. --
  55. 2.50.1