This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug other/69314] New: Use of uninitialised value in libbacktrace/pecoff.c


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69314

            Bug ID: 69314
           Summary: Use of uninitialised value in libbacktrace/pecoff.c
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ranma42 at gmail dot com
  Target Milestone: ---

In coff_add(), str_size is declared as a size_t, but if there is a symbol
table, only 4 bytes of it are initialised:

memcpy (&str_size, syms_view.data + syms_size, 4);

str_size should probably be declared as a uint32_t.

The bug at https://github.com/rust-lang/rust/issues/28447 was caused by this.
It was fixed in Rust local copy of libbacktrace:
https://github.com/rust-lang/rust/commit/55e2b7e1b4606ae0bc684293f011b7006d1f1258

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