[fsniper] Fix -Wformat-security warning (rhbz #1037073)
Jakub Hrozek
jhrozek at fedoraproject.org
Tue Dec 3 10:05:51 UTC 2013
commit de8c39ebc4ac0c5ee9c7d3b252bbe49cf331149b
Author: Jakub Hrozek <jhrozek at redhat.com>
Date: Tue Dec 3 11:04:29 2013 +0100
Fix -Wformat-security warning (rhbz #1037073)
0001-Fix-an-error-message.patch | 26 ++++++++++++++++++++++++++
fsniper.spec | 7 ++++++-
2 files changed, 32 insertions(+), 1 deletions(-)
---
diff --git a/0001-Fix-an-error-message.patch b/0001-Fix-an-error-message.patch
new file mode 100644
index 0000000..70c9460
--- /dev/null
+++ b/0001-Fix-an-error-message.patch
@@ -0,0 +1,26 @@
+From d15abeb19d1692698e0ec8a9f4a764a210e57a2b Mon Sep 17 00:00:00 2001
+From: Jakub Hrozek <jhrozek at redhat.com>
+Date: Tue, 3 Dec 2013 10:50:29 +0100
+Subject: [PATCH] Fix an error message
+
+This patch fixes https://bugzilla.redhat.com/show_bug.cgi?id=1037073
+---
+ src/handle_event.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/handle_event.c b/src/handle_event.c
+index 22f35f10ea3a6083c2ef933f794b529b8879a1ed..cac004b76917c192ad9bf8801062d701e4dc18c6 100644
+--- a/src/handle_event.c
++++ b/src/handle_event.c
+@@ -313,7 +313,7 @@ void handle_event(struct inotify_event* event, int writefd)
+ if (sysret == 127)
+ {
+ temp = malloc(27 + strlen(handler->value) + 20 + 1);
+- sprintf("Could not execute handler \"%s\", trying next one.\n", handler->value);
++ sprintf(temp, "Could not execute handler \"%s\", trying next one.\n", handler->value);
+ write_out(writefd, temp);
+
+ free(temp);
+--
+1.8.4.2
+
diff --git a/fsniper.spec b/fsniper.spec
index b26fc06..3c91fcf 100644
--- a/fsniper.spec
+++ b/fsniper.spec
@@ -1,6 +1,6 @@
Name: fsniper
Version: 1.3.1
-Release: 12%{?dist}
+Release: 13%{?dist}
Summary: A tool that monitors directories for new files and invokes scripts on them
Group: Applications/File
@@ -13,6 +13,7 @@ Source3: fsniper.sysconfig
# Fix umask permissions - http://bugs.l3ib.org/index.php?do=details&task_id=21
Patch1: fsniper-umask.patch
+Patch2: 0001-Fix-an-error-message.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -40,6 +41,7 @@ write the scripts yourself.
%prep
%setup -q
%patch1 -p1 -b .umask
+%patch2 -p1 -b .errmessage
%build
@@ -118,6 +120,9 @@ fi
/bin/systemctl try-restart %{servicename} >/dev/null 2>&1 || :
%changelog
+* Tue Dec 02 2012 Jakub Hrozek <jhrozek at redhat.com> - 1.3.1-13
+- Fix -Wformat-security warning (rhbz #1037073)
+
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.3.1-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
More information about the scm-commits
mailing list