joes        2003/01/07 20:47:34

  Modified:    .        Changes
               Request  Request.xs
  Log:
  Sven Geisler's patch to prevent segfaults in $upload->fh (empty file upload 
w/ active upload_hook).  See Changes 1.05 for details.
  
  Revision  Changes    Path
  1.45      +3 -1      httpd-apreq/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/httpd-apreq/Changes,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- Changes   5 Jan 2003 20:02:31 -0000       1.44
  +++ Changes   8 Jan 2003 04:47:34 -0000       1.45
  @@ -6,7 +6,9 @@
   
   Include patch and supporting documentation for OS X [David Wheeler].
   Temporarily revert test suite to Apache::test. [Joe Schaefer]
  -Update Request.xs to avoid some segfaults in perl 5.8 [Sven Geisler].
  +Update Request.xs to avoid segfaults caused by empty file uploads
  +via an upload_hook. The upload_hook isn't called in this case,
  +which triggered a segfault in $upload->fh [Sven Geisler].
   
   =item 1.04 - November 5, 2002
   
  
  
  
  1.32      +6 -1      httpd-apreq/Request/Request.xs
  
  Index: Request.xs
  ===================================================================
  RCS file: /home/cvs/httpd-apreq/Request/Request.xs,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- Request.xs        5 Jan 2003 20:35:50 -0000       1.31
  +++ Request.xs        8 Jan 2003 04:47:34 -0000       1.32
  @@ -495,9 +495,14 @@
   
       PREINIT:
       int fd;
  +    FILE *fp;
   
       CODE:
  -    fd = PerlLIO_dup(fileno(ApacheUpload_fh(upload)));
  +    fp = ApacheUpload_fh(upload);
  +    if (fp == NULL)
  +        XSRETURN_UNDEF;
  +
  +    fd = PerlLIO_dup(fileno(fp));
   
       /* XXX: user should check errno on undef returns */
   
  
  
  

Reply via email to