This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug dynamic-link/15309] New: dl_open_worker doesn't fully initialize seen array during init sort
- From: "dhatch at ilm dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 27 Mar 2013 07:46:18 +0000
- Subject: [Bug dynamic-link/15309] New: dl_open_worker doesn't fully initialize seen array during init sort
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=15309
Bug #: 15309
Summary: dl_open_worker doesn't fully initialize seen array
during init sort
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: dynamic-link
AssignedTo: unassigned@sourceware.org
ReportedBy: dhatch@ilm.com
Classification: Unclassified
In elf/dl-open.c, in dl_open_worker(), the "seen" array was recently changed
from a char[] to uint16_t[], but the initialization wasn't changed to match:
28363bbf (Jeff Law 2012-06-21 09:26:41 -0600 346) uint16_t
seen[nmaps];
6ee65ed6 (Ulrich Drepper 2012-01-27 15:05:19 -0500 347) memset
(seen, '\0', nmaps);
It should be:
memset (seen, '\0', nmaps * sizeof(seen[0]));
Theoretically this could cause some loops in this sorting routine
to terminate prematurely, resulting in an incorrect sort.
Not sure whether this ever happens in practice.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.