Re: [gdm-list] change gdm_address_new_from_sockaddr_storage to gdm_address_new_from_sockaddr
- From: "William Jon McCann" <mccann jhu edu>
- To: "Ray Strode" <halfline gmail com>
- Cc: gdm-list gnome org
- Subject: Re: [gdm-list] change gdm_address_new_from_sockaddr_storage to gdm_address_new_from_sockaddr
- Date: Mon, 15 Oct 2007 12:02:53 -0400
Hey,
On 10/14/07, Ray Strode <halfline gmail com> wrote:
> Hi Jon,
>
> The function gdm_address_new_from_sockaddr_storage gets called in a
> few places with socket addresses that aren't necessary
> sockaddr_storage bytes big (all the places that call getaddrinfo).
> This results in the memdup call in that function potentially copying
> out of bounds bytes.
>
> We need to know how many bytes to copy, so we don't copy more than are
> allocated, or less than the address type needs.
>
> I've attached a patch to change
>
> GdmAddress *
> gdm_address_new_from_sockaddr_storage (sockaddr_storage *ss)
>
> to
>
> GdmAddress *
> gdm_address_new_from_sockaddr (sockaddr *sa, size_t size)
Looks good. Committed. I really appreciate it.
Jon
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]