alpha net-yy test failures due to port decode errors

Mike Frysinger vapier at gentoo.org
Mon Mar 2 09:48:13 UTC 2015


On 02 Mar 2015 17:10, Masatake YAMATO wrote:
> On Sun, 1 Mar 2015 04:05:33 -0500, Mike Frysinger <vapier at gentoo.org> wrote:
> > it looks like the logic in socketutils.c is off a bit.  maybe some of the 
> > buffers aren't correct ?  the large number marked "static" is a bit concerning.
> > if i hack inet_parse_response and increase zero_addr by an arbitrary 20 bytes,
> > the port gets decoded correctly and the test starts passing.
> 
> I'd like to know about your "hack" exactly.
> Could you show me it as a diff file?

--- a/socketutils.c
+++ b/socketutils.c
@@ -64,7 +64,7 @@ inet_parse_response(const char *proto_name, const void *data, int data_len,
 		    const unsigned long inode)
 {
 	const struct inet_diag_msg *diag_msg = data;
-	static const char zero_addr[sizeof(struct in6_addr)];
+	static const char zero_addr[sizeof(struct in6_addr) + 20];
 	socklen_t addr_size, text_size;
 
 	if (diag_msg->idiag_inode != inode)
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20150302/c7870e30/attachment.bin>


More information about the Strace-devel mailing list