Bug 1101 - format-security error in DBus-gio.cc
Status:
RESOLVED FIXED
Component:
Build-Env
Version:
cvs
Hardware:
All All
Importance:
P5 normal
Target Milestone:
---
Assignee:
Rob Caelers
URL:
Depends on:
Blocks:
Reported:
Jan 24 2013 20:13:55 UTC
by:
Michael Terry
Modified:
May 25 2013 19:40:11 UTC
CC List:
Francois Marier
| Who | When | What | Removed | Added |
|---|---|---|---|---|
| Rob Caelers | May 9 2013 11:50:35 UTC | status | NEW | RESOLVED |
| resolution | FIXED | |||
| Rob Caelers | May 25 2013 19:40:11 UTC | cc | Francois Marier |
Description
Michael Terry Jan 24 2013 20:13:55 UTC
When compiling workrave with -Werror=format-security, you get an error in common/src/DBus-gio.cc because it passes a string directly to the printf-style-argument of g_dbus_method_invocation_return_error.
The following patch fixes it.
Index: workrave-1.10/common/src/DBus-gio.cc
===================================================================
--- workrave-1.10.orig/common/src/DBus-gio.cc 2013-01-08 12:39:35.000000000 -0500
+++ workrave-1.10/common/src/DBus-gio.cc 2013-01-24 12:05:58.963153150 -0500
@@ -433,7 +433,7 @@
g_dbus_method_invocation_return_error (invocation,
G_IO_ERROR,
G_IO_ERROR_FAILED_HANDLED,
- e.details().c_str());
+ "%s", e.details().c_str());
}
}Comment 1
Rob Caelers May 25 2013 19:40:11 UTC
*** Bug 1116 has been marked as a duplicate of this bug. ***