[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix connect/sendto/sendmsg into making sure to ignore bytes
From: |
Roland McGrath |
Subject: |
Re: [PATCH] Fix connect/sendto/sendmsg into making sure to ignore bytes beyond sockaddr length |
Date: |
Sat, 7 Feb 2015 18:12:51 -0800 (PST) |
> Thanks Tanaka Akira for the report.
General glibc policy is that if a bug was user-visible (i.e. observable in
a user program that was not itself using undefined behavior, etc.) then
there should be a bugzilla item filed for it. That BZ# should then be
in the ChangeLog entry.
> --- /dev/null
> +++ b/hurd/hurdsocket.h
Because of its particular content and modern re-#define rules, this file
will actually work OK without a multiple inclusion guard. But normal
practice is to have one, so please do.
> +#define _hurd_sun_path_dupa(__addr, __len) \
> + strndupa ((__addr)->sun_path, (__len) - offsetof (struct sockaddr_un,
> sun_path))
Don't use __ names for macro arguments. There's no need. This should
really have a comment saying both what precisely it does, and where and why
it's important to use it.
Otherwise this looks fine.
Thanks,
Roland