unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Philipp Stephani <p.stephani2@gmail.com>
Cc: phst@google.com, emacs-devel@gnu.org
Subject: Re: [PATCH] Fix use of sockaddr_in
Date: Sat, 13 May 2017 19:52:02 +0300	[thread overview]
Message-ID: <83h90o8zt9.fsf@gnu.org> (raw)
In-Reply-To: <20170513150837.31184-1-phst@google.com> (message from Philipp Stephani on Sat, 13 May 2017 17:08:37 +0200)

> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Sat, 13 May 2017 17:08:37 +0200
> Cc: Philipp Stephani <phst@google.com>
> 
> 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.



  reply	other threads:[~2017-05-13 16:52 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-07  3:40 building/using address-sanitizer-enabled emacs? Jim Meyering
2017-05-07 19:54 ` Paul Eggert
2017-05-07 21:44   ` Jim Meyering
2017-05-08  2:36   ` Eli Zaretskii
2017-05-08  5:42     ` Paul Eggert
2017-05-08 14:39       ` Eli Zaretskii
2017-05-08 14:46         ` Paul Eggert
2017-05-08 16:04           ` Eli Zaretskii
2017-05-09  5:48             ` Jim Meyering
2017-05-09 15:18               ` Eli Zaretskii
2017-05-09 17:06                 ` Jim Meyering
2017-05-09 17:45                   ` Eli Zaretskii
2017-05-09 19:22               ` Paul Eggert
2017-05-09 22:49                 ` Jim Meyering
2017-05-10  2:41                   ` Eli Zaretskii
2017-05-16 21:49                     ` Paul Eggert
2017-05-17  2:24                       ` Eli Zaretskii
2017-05-17 14:46                         ` Paul Eggert
2017-05-17 16:06                           ` Eli Zaretskii
2017-05-17 20:05                             ` Paul Eggert
2017-05-18  4:15                               ` Eli Zaretskii
2017-05-09 23:15 ` Philipp Stephani
2017-05-10  2:42   ` Eli Zaretskii
2017-05-10 22:24     ` Philipp Stephani
2017-05-13  8:02       ` Eli Zaretskii
2017-05-13 15:08         ` [PATCH] Fix use of sockaddr_in Philipp Stephani
2017-05-13 16:52           ` Eli Zaretskii [this message]
2017-05-13 19:14             ` Andreas Schwab
2017-05-13 19:29               ` Eli Zaretskii
2017-05-13 20:05                 ` Andreas Schwab
2017-05-14  2:32                   ` Eli Zaretskii
2017-05-14  6:11                     ` Andreas Schwab
2017-05-14 14:20                       ` Eli Zaretskii
2017-05-15  6:15                         ` Paul Eggert
2017-05-15  9:04                           ` Philipp Stephani
2017-05-17 20:38                             ` Paul Eggert
2017-05-27 11:35                               ` Philipp Stephani
2017-05-17 15:16                           ` Eli Zaretskii
2017-05-17 20:15                             ` Paul Eggert
2017-05-14 10:28           ` Lars Ingebrigtsen
2017-05-14 19:06             ` Philipp Stephani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83h90o8zt9.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=p.stephani2@gmail.com \
    --cc=phst@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).