emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 35cbe20: src/process.c Correctly convert AF_INET6


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] emacs-25 35cbe20: src/process.c Correctly convert AF_INET6 addresses
Date: Sun, 07 Feb 2016 01:56:07 +0000

branch: emacs-25
commit 35cbe2095ba024f6ee60799cd560771f2ef739a4
Author: David Edmondson <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    src/process.c Correctly convert AF_INET6 addresses
    
    * src/process.c (conv_lisp_to_sockaddr): AF_INET6 addresses are
    converted to a list of 16 bit quantities by
    conv_sockaddr_to_lisp(). conv_lisp_to_sockaddr() should follow the
    same scheme rather than expecting a (longer) list of 8 bit
    quantities.
    
    Backport:
    
    (cherry picked from commit 55ce3c30d617c38eb086d5ad4ffbd881c20c559c)
---
 src/process.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/process.c b/src/process.c
index e1ebdff..1eac5e1 100644
--- a/src/process.c
+++ b/src/process.c
@@ -2372,7 +2372,7 @@ conv_lisp_to_sockaddr (int family, Lisp_Object address, 
struct sockaddr *sa, int
        {
          struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) sa;
          uint16_t *ip6 = (uint16_t *)&sin6->sin6_addr;
-         len = sizeof (sin6->sin6_addr) + 1;
+         len = sizeof (sin6->sin6_addr) / 2 + 1;
          hostport = XINT (p->contents[--len]);
          sin6->sin6_port = htons (hostport);
          for (i = 0; i < len; i++)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]