diff options
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/vms-alpha.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index eee5d42..ee8eaf0 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2022-12-05 Nick Clifton <nickc@redhat.com> + + PR 29848 + * vms-alpha.c (parse_module): Fix potential out of bounds memory + access. + 2022-12-01 Nick Clifton <nickc@redhat.com> PR 25202 diff --git a/bfd/vms-alpha.c b/bfd/vms-alpha.c index 9531953..c0eb5bc 100644 --- a/bfd/vms-alpha.c +++ b/bfd/vms-alpha.c @@ -4366,7 +4366,7 @@ parse_module (bfd *abfd, struct module *module, unsigned char *ptr, return false; module->line_table = curr_line; - while (length == -1 || ptr < maxptr) + while (length == -1 || (ptr + 3) < maxptr) { /* The first byte is not counted in the recorded length. */ int rec_length = bfd_getl16 (ptr) + 1; |