[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix use of sockaddr_in
From: |
Eli Zaretskii |
Subject: |
Re: [PATCH] Fix use of sockaddr_in |
Date: |
Sat, 13 May 2017 19:52:02 +0300 |
> From: Philipp Stephani <address@hidden>
> Date: Sat, 13 May 2017 17:08:37 +0200
> Cc: Philipp Stephani <address@hidden>
>
> Fixes an access violation detected by AddressSanitizer.
>
> * process.c (connect_network_socket): Use sockaddr_storage
> structure instead of sockaddr_in. Only sockaddr_storage is
> guaranteed to be large enough for all address families.
Thanks.
The first hunk doesn't seem to be necessary, though: in both IPv4 and
IPv6 structures, the port is at the same offset and has the same size.
So I'd rather put an assertion there, to verify that the offsets and
sizes are the same (because the standards don't guarantee that), and
that's all.
- Re: building/using address-sanitizer-enabled emacs?, (continued)
- Re: building/using address-sanitizer-enabled emacs?, Eli Zaretskii, 2017/05/16
- Re: building/using address-sanitizer-enabled emacs?, Paul Eggert, 2017/05/17
- Re: building/using address-sanitizer-enabled emacs?, Eli Zaretskii, 2017/05/17
- Re: building/using address-sanitizer-enabled emacs?, Paul Eggert, 2017/05/17
- Re: building/using address-sanitizer-enabled emacs?, Eli Zaretskii, 2017/05/18
Re: building/using address-sanitizer-enabled emacs?, Philipp Stephani, 2017/05/09
- Re: building/using address-sanitizer-enabled emacs?, Eli Zaretskii, 2017/05/09
- Re: building/using address-sanitizer-enabled emacs?, Philipp Stephani, 2017/05/10
- Re: building/using address-sanitizer-enabled emacs?, Eli Zaretskii, 2017/05/13
- [PATCH] Fix use of sockaddr_in, Philipp Stephani, 2017/05/13
- Re: [PATCH] Fix use of sockaddr_in,
Eli Zaretskii <=
- Re: [PATCH] Fix use of sockaddr_in, Andreas Schwab, 2017/05/13
- Re: [PATCH] Fix use of sockaddr_in, Eli Zaretskii, 2017/05/13
- Re: [PATCH] Fix use of sockaddr_in, Andreas Schwab, 2017/05/13
- Re: [PATCH] Fix use of sockaddr_in, Eli Zaretskii, 2017/05/13
- Re: [PATCH] Fix use of sockaddr_in, Andreas Schwab, 2017/05/14
- Re: [PATCH] Fix use of sockaddr_in, Eli Zaretskii, 2017/05/14
- Re: [PATCH] Fix use of sockaddr_in, Paul Eggert, 2017/05/15
- Re: [PATCH] Fix use of sockaddr_in, Philipp Stephani, 2017/05/15
- Re: [PATCH] Fix use of sockaddr_in, Paul Eggert, 2017/05/17
- Re: [PATCH] Fix use of sockaddr_in, Philipp Stephani, 2017/05/27