This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
gdb/1658: dwarf2read.c line of code wrongly assumes length is 1 byte, read leb128
- From: coulter at cup dot hp dot com
- To: gdb-gnats at sources dot redhat dot com
- Date: 26 May 2004 19:38:54 -0000
- Subject: gdb/1658: dwarf2read.c line of code wrongly assumes length is 1 byte, read leb128
- Reply-to: coulter at cup dot hp dot com
>Number: 1658
>Category: gdb
>Synopsis: dwarf2read.c line of code wrongly assumes length is 1 byte, read leb128
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed May 26 19:48:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: coulter@cup.hp.com (Michael Coulter)
>Release: 6.1
>Organization:
>Environment:
>Description:
In dwarf2read.c, there is a line:
line_ptr += 1; /* ignore length */
This improperly presumes that the leb128 length will only
use 1 byte. This can be violated with inline function calls.
Replace with:
length = read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
line_ptr += bytes_read;
>How-To-Repeat:
>Fix:
In dwarf2read.c, there is a line:
line_ptr += 1; /* ignore length */
This improperly presumes that the leb128 length will only
use 1 byte. This can be violated with inline function calls.
Replace with:
length = read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
line_ptr += bytes_read;
>Release-Note:
>Audit-Trail:
>Unformatted: