This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb/1658: dwarf2read.c line of code wrongly assumes length is 1 byte, read leb128


>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]