vms-alpha: integer overflow

Alan Modra amodra@gmail.com
Mon Oct 6 03:04:52 GMT 2025


image_offset takes values from section vma then increments when
filling out section data.  Avoid signed integer overflow.

	* vms-alpha.c (struct vms_private_data_struct): Make image_offset
	unsigned.

diff --git a/bfd/vms-alpha.c b/bfd/vms-alpha.c
index 36cdac68994..277cba0107e 100644
--- a/bfd/vms-alpha.c
+++ b/bfd/vms-alpha.c
@@ -304,7 +304,7 @@ struct vms_private_data_struct
 
   /* Content reading.  */
   asection *image_section;		/* section for image_ptr  */
-  file_ptr image_offset;		/* Offset for image_ptr.  */
+  ufile_ptr image_offset;		/* Offset for image_ptr.  */
 
   struct module *modules;		/* list of all compilation units */
 

-- 
Alan Modra


More information about the Binutils mailing list