Patch by Robert Scheck <robert@fedoraproject.org> for digitemp >= 3.6.0, which fixes the
build failures if compiled with "-Werror=format-security". For further information please
also have a look to https://bugzilla.redhat.com/show_bug.cgi?id=1037039
Proposed to upstream via e-mail at Sun, 8 Dec 2013 01:37:56 +0100.
--- digitemp-3.6.0/src/digitemp.c 2008-08-28 06:42:48.000000000 +0200
+++ digitemp-3.6.0/src/digitemp.c.format-security 2013-12-08 01:23:11.000000000 +0100
@@ -586,7 +586,7 @@
perror("Error loging to logfile");
close( fd );
} else {
- printf( line );
+ printf("%s", line );
}
return 0;
}
--- digitemp-3.6.0/userial/ioutil.c 2007-06-07 23:25:58.000000000 +0200
+++ digitemp-3.6.0/userial/ioutil.c.format-security 2013-12-08 01:24:49.000000000 +0100
@@ -86,7 +86,7 @@
// remember the start length
deflen = strlen(buf);
if (deflen < 80)
- sprintf(defbuf,buf);
+ sprintf(defbuf,"%s",buf);
else
defbuf[0] = 0;