Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at
Bug 1037034 - detox FTBFS if "-Werror=format-security" flag is used
Summary: detox FTBFS if "-Werror=format-security" flag is used
Alias: None
Product: Fedora
Classification: Fedora
Component: detox
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Filipe Rosset
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: FTBFS 1038083
TreeView+ depends on / blocked
Reported: 2013-12-03 02:58 UTC by Dhiru Kholia
Modified: 2014-03-25 03:44 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-03-18 22:29:46 UTC
Type: ---

Attachments (Terms of Use)
patch for detox.spec (deleted)
2014-03-11 04:53 UTC, Filipe Rosset
no flags Details | Diff
patch for detox-format-security error (deleted)
2014-03-11 04:54 UTC, Filipe Rosset
no flags Details | Diff

Description Dhiru Kholia 2013-12-03 02:58:36 UTC
Description of problem

detox fails to build if "-Werror=format-security" flag is used.


parse_options_getopt.c:101:5: error: format not a string literal and no format arguments [-Werror=format-security]
parse_options_getopt.c:103:5: error: format not a string literal and no format arguments [-Werror=format-security]
parse_options_getopt.c:141:5: error: format not a string literal and no format arguments [-Werror=format-security]
parse_options_getopt.c:198:3: error: format not a string literal and no format arguments [-Werror=format-security]


We are working on a proposal to enable "-Werror=format-security" for all
packages. Once this flag is enabled, GCC will refuse to compile code that could
be vulnerable to a string format security flaw. For more details, please see page.

To understand why it is important to fix this, please see page.

How to fix this

The fix for these errors is quite simple. It's a matter of changing a
line like,


to read,

   printf("%s", foo);

That's it.

Please fix this issue in rawhide with a patch (which you should submit
to upstream to merge moving forward). Please do a new build with the
fix in rawhide. Other releases do not need to be directly fixed, but
there should be no harm in pushing out this fix/patch with other needed
changes to those branches.

In the event you don't fix this bug before the next mass rebuild,
provenpackagers may step in and update your package(s) to fix this

How reproducible

Build detox-1.2.0-9.fc20.src.rpm with "-Werror=format-security" flag to reproduce the problem.

To make this process easier, you can use a modified "redhat-rpm-config" package
from URL.

$ sha256sum redhat-rpm-config-9.1.0-56.fc20.*
faad7594b2080fe76497d0ce50808c905a93dd7b41c1defdde5ca57e3833d3d2  redhat-rpm-config-9.1.0-56.fc20.noarch.rpm
5aa9357174305c7285ffdbc92d7ffe1c07a8a95d5459b930461308f5aad75413  redhat-rpm-config-9.1.0-56.fc20.src.rpm

Comment 1 Filipe Rosset 2014-03-11 04:53:04 UTC
Created attachment 872963 [details]
patch for detox.spec

Comment 2 Filipe Rosset 2014-03-11 04:54:25 UTC
Created attachment 872964 [details]
patch for detox-format-security error

Comment 3 Filipe Rosset 2014-03-11 05:15:58 UTC
Sven, I've requested access to co-maintain detox. Please take a look and if you need help I can go ahead and fix it.

Comment 5 Filipe Rosset 2014-03-18 23:01:42 UTC
upstream looks that but I opened an issue to request author to commit the patch upstream

Note You need to log in before you can comment on or make changes to this bug.