[Top][All Lists]

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

[Guile-commits] GNU Guile branch, master, updated. release_1-9-15-79-g33

From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-15-79-g333a81c
Date: Sun, 13 Feb 2011 20:00:49 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

The branch, master has been updated
       via  333a81ccbadc7a81abec1aff4b5981b9fad3786b (commit)
      from  5a79300f8596c4dc3ff71e9faa587531f76798f7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 333a81ccbadc7a81abec1aff4b5981b9fad3786b
Author: Noah Lavine <address@hidden>
Date:   Sat Feb 12 21:05:34 2011 -0500

    zero newly allocated sockaddrs
    * libguile/socket.c (scm_to_sockaddr, scm_fill_sockaddr): Zero the
      sockaddrs, so we do not pass uninitialized memory to the kernel.


Summary of changes:
 libguile/socket.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/libguile/socket.c b/libguile/socket.c
index aa52cac..d8ab005 100644
--- a/libguile/socket.c
+++ b/libguile/socket.c
@@ -796,6 +796,7 @@ scm_fill_sockaddr (int fam, SCM address, SCM *args, int 
        port = scm_to_int (SCM_CAR (*args));
        *args = SCM_CDR (*args);
        soka = (struct sockaddr_in *) scm_malloc (sizeof (struct sockaddr_in));
+        memset (soka, '\0', sizeof (struct sockaddr_in));
        soka->sin_len = sizeof (struct sockaddr_in);
@@ -1131,6 +1132,8 @@ scm_to_sockaddr (SCM address, size_t *address_size)
            struct sockaddr_in c_inet;
+            memset (&c_inet, '\0', sizeof (struct sockaddr_in));
            c_inet.sin_addr.s_addr =
              htonl (scm_to_ulong (SCM_SIMPLE_VECTOR_REF (address, 1)));
            c_inet.sin_port =

GNU Guile

reply via email to

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