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

Re: Bug in ZMailer-2.99.14 scheduler



Hi,

on 4 Jul 1995 21:43:16 +0200 Thomas Knott wrote 
concerning "Bug in ZMailer-2.99.14 scheduler" something like this:

> *** 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));
                                         ^^^^^^^^^^^^
Be careful. This is does not allocate memory for the trailing 0. You'd
better add 1. Also, maybe you'd want to include a function estrdup, that
mimics strdup including error checking.

> ! 	  strcpy(t_files[t_n], path);
> ! 	  t_n++;
>   	}
>   #else
>   	if (verbose)