httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stodd...@hyperreal.org
Subject cvs commit: apache-2.0/src/lib/apr/network_io/win32 sendrecv.c
Date Fri, 04 Feb 2000 19:05:25 GMT
stoddard    00/02/04 11:05:24

  Modified:    src/lib/apr/network_io/win32 sendrecv.c
  Log:
  Fix segfault. We were clobbering the stack with this memcpy :-)
  
  Revision  Changes    Path
  1.8       +2 -2      apache-2.0/src/lib/apr/network_io/win32/sendrecv.c
  
  Index: sendrecv.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/win32/sendrecv.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- sendrecv.c	2000/01/31 19:21:41	1.7
  +++ sendrecv.c	2000/02/04 19:05:22	1.8
  @@ -190,7 +190,7 @@
           tfb.Head = ap_palloc(sock->cntxt, tfb.HeadLength); /* Should this be a malloc?
*/
   
           for (i = 0; i < hdtr->numheaders; i++) {
  -            memcpy(&tfb.Head + ptr, hdtr->headers[i].iov_base,
  +            memcpy((char*)tfb.Head + ptr, hdtr->headers[i].iov_base,
                      hdtr->headers[i].iov_len);
               ptr += hdtr->headers[i].iov_len;
           }
  @@ -204,7 +204,7 @@
           tfb.Tail = ap_palloc(sock->cntxt, tfb.TailLength); /* Should this be a malloc?
*/
   
           for (i = 0; i < hdtr->numtrailers; i++) {
  -            memcpy(&tfb.Tail + ptr, hdtr->trailers[i].iov_base,
  +            memcpy((char*)tfb.Tail + ptr, hdtr->trailers[i].iov_base,
                      hdtr->trailers[i].iov_len);
               ptr += hdtr->trailers[i].iov_len;
           }
  
  
  

Mime
View raw message