[dovecot-cvs] dovecot/src/lib compat.c,1.8,1.9 failures.c,1.11,1.12

cras at procontrol.fi cras at procontrol.fi
Sun Dec 22 08:28:46 EET 2002


Update of /home/cvs/dovecot/src/lib
In directory danu:/tmp/cvs-serv15536/lib

Modified Files:
	compat.c failures.c 
Log Message:
Don't leak data stack memory.



Index: compat.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/compat.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- compat.c	22 Dec 2002 06:25:50 -0000	1.8
+++ compat.c	22 Dec 2002 06:28:44 -0000	1.9
@@ -72,7 +72,9 @@
 #ifndef HAVE_VSYSLOG
 void my_vsyslog(int priority, const char *format, va_list args)
 {
+	t_push();
 	syslog(priority, "%s", t_strdup_vprintf(format, args));
+	t_pop();
 }
 #endif
 

Index: failures.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/failures.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- failures.c	22 Dec 2002 06:25:50 -0000	1.11
+++ failures.c	22 Dec 2002 06:28:44 -0000	1.12
@@ -95,6 +95,7 @@
 	if (log_fd == NULL)
 		log_fd = stderr;
 
+	t_push();
 	if (recursed == 2) {
 		/* write without fixing format, that probably killed us
 		   last time. */
@@ -114,6 +115,8 @@
 	}
 
 	fputc('\n', log_fd);
+
+	t_pop();
 
 	errno = old_errno;
 	recursed--;




More information about the dovecot-cvs mailing list