mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
Fix an illegal memory access when parsing a corrupt VMS Alpha file.
PR 29848 * vms-alpha.c (parse_module): Fix potential out of bounds memory access.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user