On Fri, 19 Oct 2001, Daniel Drown wrote: > vpopmail.c, function tcprules_open, line 2067 copies the uninitialized > variable template to bin2: > strncat( bin2, template, BUFF_SIZE); > > That line should probably be removed. > > Also, the relay_template variable seems to no longer be used in that file.
okay, here is my patch: --- vpopmail.c Mon Oct 8 12:09:12 2001 +++ vpopmail.c.new Fri Oct 19 16:27:19 2001 @@ -2044,12 +2044,11 @@ { int pim[2]; long unsigned pid; - char template[20]; memset(bin0,0,BUFF_SIZE); memset(bin1,0,BUFF_SIZE); memset(bin2,0,BUFF_SIZE); - snprintf(relay_template, 300, ".tmp.%lu", (long unsigned)getpid()); + snprintf(relay_template, 300, "%s.tmp.%lu", TCP_FILE, (long unsigned)getpid()); if (pipe(pim) == -1) { return(-1);} @@ -2063,8 +2062,7 @@ strncpy(bin0, TCPRULES_PROG, BUFF_SIZE); strncpy( bin1, TCP_FILE, BUFF_SIZE); strncat( bin1, ".cdb", BUFF_SIZE); - strncpy( bin2, TCP_FILE, BUFF_SIZE); - strncat( bin2, template, BUFF_SIZE); + strncpy( bin2, relay_template, BUFF_SIZE); binqqargs[0] = bin0; binqqargs[1] = bin1; binqqargs[2] = bin2;