]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PR 33385 EOM
authorAlan Modra <amodra@gmail.com>
Sun, 7 Sep 2025 22:54:10 +0000 (08:24 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 8 Sep 2025 12:47:46 +0000 (22:17 +0930)
Another PR 21813 modification.

* vmd-alpha.c (_bfd_vms_slurp_eeom): Allow 10 byte EOM.
Don't set has_transfer or access fields past 10 bytes unless
the entire EEOM is there.

bfd/vms-alpha.c

index 09d343762b0eb1db520f33a2dc260d8d5094a8da..d963ff7bb483494ec67d4da3b875cf1f22ff0ffd 100644 (file)
@@ -2649,7 +2649,7 @@ _bfd_vms_slurp_eeom (bfd *abfd)
   vms_debug2 ((2, "EEOM\n"));
 
   /* PR 21813: Check for an undersized record.  */
-  if (PRIV (recrd.buf_size) < sizeof (* eeom))
+  if (PRIV (recrd.rec_size) < 10)
     {
       _bfd_error_handler (_("corrupt EEOM record - size is too small"));
       bfd_set_error (bfd_error_bad_value);
@@ -2666,7 +2666,7 @@ _bfd_vms_slurp_eeom (bfd *abfd)
     }
 
   PRIV (eom_data).eom_has_transfer = false;
-  if (PRIV (recrd.rec_size) > 10)
+  if (PRIV (recrd.rec_size) >= sizeof (*eeom))
     {
       PRIV (eom_data).eom_has_transfer = true;
       PRIV (eom_data).eom_b_tfrflg = eeom->tfrflg;