This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug regex/6722] sscanf bug when parsing lines from /proc/net/tcp
- From: "jakub at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 7 Jul 2008 19:42:38 -0000
- Subject: [Bug regex/6722] sscanf bug when parsing lines from /proc/net/tcp
- References: <20080704200314.6722.lists@roberthogan.net>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From jakub at redhat dot com 2008-07-07 19:42 -------
Well, locaddr and remaddr are 32-bit ints, but locport and remport are not;
the testcase doesn't only violate aliasing rules, but with the 32-bit write
to 16-bit memory locations also clobbers unrelated memory on the stack.
Either use %8x:%4hx and kill the bogus casts, or you need to assign to
int/unsigned int temporaries and copy to the short vars afterwards.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=6722
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.