httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@locus.apache.org
Subject cvs commit: apache-2.0/src/lib/apr/network_io/os2 sockets.c
Date Tue, 14 Nov 2000 14:08:38 GMT
bjh         00/11/14 06:08:38

  Modified:    src/lib/apr/network_io/os2 sockets.c
  Log:
  OS/2: soclose() segfaults if passed -1 so prevent this from happening if
  a closed socket is closed (was happening before BUFF was removed).
  
  Revision  Changes    Path
  1.28      +5 -0      apache-2.0/src/lib/apr/network_io/os2/sockets.c
  
  Index: sockets.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/os2/sockets.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- sockets.c	2000/11/02 03:02:48	1.27
  +++ sockets.c	2000/11/14 14:08:38	1.28
  @@ -69,6 +69,11 @@
   static apr_status_t socket_cleanup(void *sock)
   {
       apr_socket_t *thesocket = sock;
  +
  +    if (thesocket->socketdes < 0) {
  +        return APR_EINVALSOCK;
  +    }
  +
       if (soclose(thesocket->socketdes) == 0) {
           thesocket->socketdes = -1;
           return APR_SUCCESS;
  
  
  

Mime
View raw message