~ubuntu-branches/debian/stretch/guile-1.8/stretch

« back to all changes in this revision

Viewing changes to libguile/socket.c

  • Committer: Bazaar Package Importer
  • Author(s): Rob Browning
  • Date: 2011-04-27 22:26:20 UTC
  • Revision ID: james.westby@ubuntu.com-20110427222620-7asl27lgmk7r0lxf
Tags: 1.8.8+1-2
* Don't access uninitialized memory in scm_to_sockaddr().
  Thanks to Thorsten Glaser <tg@mirbsd.de> for the patch.

* Add flex as a build dependency.
  Thanks to Thorsten Glaser <tg@mirbsd.de> for the patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1143
1143
          {
1144
1144
            struct sockaddr_in c_inet;
1145
1145
 
 
1146
            /*
 
1147
             * initialise the entire struct, including all
 
1148
             * possible padding, to NUL to avoid copying
 
1149
             * uninitialised memory in the memcpy below
 
1150
             */
 
1151
            memset (&c_inet, 0, sizeof (c_inet));
 
1152
 
1146
1153
            c_inet.sin_addr.s_addr =
1147
1154
              htonl (scm_to_ulong (SCM_SIMPLE_VECTOR_REF (address, 1)));
1148
1155
            c_inet.sin_port =