[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in ZMailer-2.99.14 scheduler



Hello!

Running ZMailer-2.99.14mea, I've got many messages from scheduler like
	channel: Cannot open control file "..." from "..." as uid 0!

It seems that the problem was caused from uninitialized pointers t_files[t_n]
in function tscan() in file scheduler/transport.c. Diffs are below.

Regards
Thomas Knott

--------------------------------------------------------------------------------
*** 1.1.1.1			1995/04/25 10:34:04
--- scheduler/transport.c	1995/07/04 19:19:10
***************
*** 111,117 ****
  
  	  if (verbose)
  	    printf("  tscan() path=\"%s\"\n",path);
! 	  t_files[t_n++] = path;
  	}
  #else
  	if (verbose)
--- 111,120 ----
  
  	  if (verbose)
  	    printf("  tscan() path=\"%s\"\n",path);
! 
! 	  t_files[t_n] = (char *)emalloc(strlen(path));
! 	  strcpy(t_files[t_n], path);
! 	  t_n++;
  	}
  #else
  	if (verbose)
***************
*** 143,149 ****
  	sp_scan(tscan, (struct spblk *)NULL, spt_mesh[L_CTLFILE]);
  	dotransport(files, t_n, vhead, channel, host);
  
! #if 0
  	/* Free the strings malloced on  tscan() */
  	for (i = 0; i < t_n; ++i)
  	  free(files[i]);
--- 146,152 ----
  	sp_scan(tscan, (struct spblk *)NULL, spt_mesh[L_CTLFILE]);
  	dotransport(files, t_n, vhead, channel, host);
  
! #if 1
  	/* Free the strings malloced on  tscan() */
  	for (i = 0; i < t_n; ++i)
  	  free(files[i]);