You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lirc/lirc-use-new-instead-of-con...

29 lines
842 B

From 3e45e512719feccaa16edfd208273bade4f724e4 Mon Sep 17 00:00:00 2001
From: Mathias Hasselmann <mathias@openismus.com>
Date: Wed, 13 Feb 2008 21:16:09 +0100
Subject: Use '.new' instead of '.conf' as filename suffix in template mode,
and append that the suffix to 'filename_new' instead of 'filename',
to prevent a buffer overrun for 'argv[optind]'.
---
daemons/irrecord.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/daemons/irrecord.c b/daemons/irrecord.c
index ea298e3..df03c7b 100644
--- a/daemons/irrecord.c
+++ b/daemons/irrecord.c
@@ -364,7 +364,7 @@ int main(int argc,char **argv)
exit(EXIT_FAILURE);
}
strcpy(filename_new, filename);
- strcat(filename_new, ".conf");
+ strcat(filename_new,".new");
filename = filename_new;
}
fout=fopen(filename,"w");
if(fout==NULL)
--
1.5.3.7