This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug libc/776] New: Inconsistent struct gconvcache_header
- From: "hjl at lucon dot org" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 2 Mar 2005 01:21:33 -0000
- Subject: [Bug libc/776] New: Inconsistent struct gconvcache_header
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
In iconvconfig.h, there are
typedef uint16_t gidx_t;
struct gconvcache_header
{
uint32_t magic;
gidx_t string_offset;
gidx_t hash_offset;
gidx_t hash_size;
gidx_t module_offset;
gidx_t otherconv_offset;
};
But in iconvconfig.c, there are
/* Format of the output file.
Offset Length Description
0000 4 Magic header bytes
0004 4 Offset of string table (stoff)
0008 4 Offset of name hashing table (hoff)
000C 4 Hashing table size (hsize)
0010 4 Offset of module table (moff)
0014 4 Offset of other conversion module table (ooff)
stoff ??? String table
The lengths of stoff, hoff, hsize, moff and ooff are 2 not 4.
Also compiler may put padding in struct gconvcache_header, which may not
be initialized. When write_output does
iov[0].iov_base = &header;
iov[0].iov_len = sizeof (struct gconvcache_header);
total = iov[0].iov_len;
we may get different values in padding for different compilers.
--
Summary: Inconsistent struct gconvcache_header
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: gotom at debian dot or dot jp
ReportedBy: hjl at lucon dot org
CC: glibc-bugs at sources dot redhat dot com
http://sources.redhat.com/bugzilla/show_bug.cgi?id=776
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.