File use-strncpy-to-prevent-overflow.patch of Package sblim-cmpi-syslog
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs ../orig-sblim-cmpi-syslog-0.9.0/syslog-conf/util/syslogconfutil.c ./syslog-conf/util/syslogconfutil.c
--- ../orig-sblim-cmpi-syslog-0.9.0/syslog-conf/util/syslogconfutil.c 2013-07-24 18:43:12.000000000 +0200
+++ ./syslog-conf/util/syslogconfutil.c 2013-07-25 13:18:54.933715097 +0200
@@ -65,7 +65,7 @@
// begin enumeration
ret = setting_read();
if (!ret && (cc->fp = fopen(ConfInFile, "r")) != NULL) {
- strcpy(cc->name, ConfInFile);
+ strncpy(cc->name, ConfInFile, L_tmpnam-1);
}
else {
syslog_debug(stderr, "Unable to sort the file\n");