httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Terbush <ra...@zyzzyva.com>
Subject mod_imap patch to fix core dump
Date Sat, 22 Jul 1995 16:32:23 GMT

I found a bug that was causing a core dump when the request did not
have a valid Referer: header.  (Yeah, you warned me....) :-)
Here is the patch.

*** mod_imap.c.orig	Sat Jul 22 11:18:10 1995
--- mod_imap.c	Sat Jul 22 11:25:28 1995
***************
*** 311,317 ****
  	    }
  	    else if (!strcmp (mapurl, "referer")) {
  
! 		strcpy (base_uri, referer);
  	    }
  	    else if ((mapurl[0] == '/') || (!strstr (mapurl, "://")))  {
  	    
--- 311,323 ----
  	    }
  	    else if (!strcmp (mapurl, "referer")) {
  
! 		if (referer != NULL) {
! 
! 		    strcpy (base_uri, referer);
! 		}
! 		else {
! 		    strcpy (base_uri, r->uri);
! 		}
  	    }
  	    else if ((mapurl[0] == '/') || (!strstr (mapurl, "://")))  {
  	    




Mime
View raw message