httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Terbush <ra...@zyzzyva.com>
Subject Found and fixed
Date Thu, 08 Jun 1995 03:18:50 GMT

The following line in my HTML documents was the culprit in
the core fest from 0.7.2c. Is this now a bogus format?

<!--#config timefmt="%A, %B %d, %Y"-->

Anyway, the real culprit was the strncmp() call of env[i].
The other stuff got cleaned up along the way.  BTW - Has
anyone else tried to compile 0.7 with -Wall??... Don't :^)

Could someone please put this in the proper place, My access
is all f*cked up right now.

------- Forwarded Message

*** apache_0.7.2c/src/util.c	Tue Jun  6 21:18:10 1995
- --- apache_0.7.2d/src/util.c	Wed Jun  7 22:18:51 1995
***************
*** 124,131 ****
      tms = (gmt ? gmtime(&t) : localtime(&t));
  
      /* check return code? */
!     strftime(ts,MAX_STRING_LEN,fmt,tms);
!     return ts;
  }
  
  /* What a pain in the ass. */
- --- 124,134 ----
      tms = (gmt ? gmtime(&t) : localtime(&t));
  
      /* check return code? */
!     if( ( strftime(ts,MAX_STRING_LEN,fmt,tms) != 0 ) ) {
!     	return ts;
!     } else {
! 	return NULL;
!     }
  }
  
  /* What a pain in the ass. */
***************
*** 605,611 ****
  }
  
  char *make_env_str(request_record *request, char *name, char *value, FILE *out) {
!     char *t,*tp;
  
      if(!(t = (char *)malloc(strlen(name)+strlen(value)+2)))
          die(request, NO_MEMORY,"make_env_str",out);
- --- 608,615 ----
  }
  
  char *make_env_str(request_record *request, char *name, char *value, FILE *out) {
!     char *t = NULL;
!     char *tp = NULL;
  
      if(!(t = (char *)malloc(strlen(name)+strlen(value)+2)))
          die(request, NO_MEMORY,"make_env_str",out);
***************
*** 620,626 ****
      register int i, len;
  
      for (i = 0, len = strlen(name); env[i]; i++)
!        if (strncmp(env[i], name, len) == 0) {
          free(env[i]);
          env[i] = make_env_str(request, name, value, out);
          break;
- --- 624,630 ----
      register int i, len;
  
      for (i = 0, len = strlen(name); env[i]; i++)
!        if (strncmp(&env[i], name, len) == 0) {
          free(&env[i]);
          env[i] = make_env_str(request, name, value, out);
          break;
***************
*** 1132,1138 ****
  */
  char **add_redirection_status_env(request_record *request, char **env,
                                    FILE *out, int status) {
!     char t[HUGE_STRING_LEN],*env_path;
      int x;
  
      if(!(env = new_env(request, env,1,&x)))
- --- 1136,1142 ----
  */
  char **add_redirection_status_env(request_record *request, char **env,
                                    FILE *out, int status) {
!     char t[HUGE_STRING_LEN];
      int x;
  
      if(!(env = new_env(request, env,1,&x)))

------- End of Forwarded Message




Mime
View raw message