89675d7
From 3e45e512719feccaa16edfd208273bade4f724e4 Mon Sep 17 00:00:00 2001
89675d7
From: Mathias Hasselmann <mathias@openismus.com>
89675d7
Date: Wed, 13 Feb 2008 21:16:09 +0100
89675d7
Subject: Use '.new' instead of '.conf' as filename suffix in template mode,
89675d7
 and append that the suffix to 'filename_new' instead of 'filename',
89675d7
 to prevent a buffer overrun for 'argv[optind]'.
89675d7
89675d7
---
17c5bcd
diff -Naurp lirc.orig/daemons/irrecord.c lirc/daemons/irrecord.c
17c5bcd
--- lirc.orig/daemons/irrecord.c	2008-08-27 13:04:46.000000000 -0400
17c5bcd
+++ lirc/daemons/irrecord.c		2008-09-24 17:01:37.000000000 -0400
17c5bcd
@@ -493,7 +493,7 @@ int main(int argc,char **argv)
89675d7
 			exit(EXIT_FAILURE);
89675d7
 		}
89675d7
 		strcpy(filename_new, filename);
89675d7
-		strcat(filename_new, ".conf");
17c5bcd
+		strcat(filename_new, ".new");
17c5bcd
 		filename = filename_new;
89675d7
 	}
17c5bcd
 	else