]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
vms-alpha: integer overflow
authorAlan Modra <amodra@gmail.com>
Mon, 6 Oct 2025 02:54:31 +0000 (13:24 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 6 Oct 2025 03:01:31 +0000 (13:31 +1030)
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.

bfd/vms-alpha.c

index 36cdac68994f72c19f460b4f08cf6426f3a3ad60..277cba0107eb80c428f78127d6ea4240f1e33ef2 100644 (file)
@@ -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 */