[Clp] fix "format not a string literal and no format arguments" issue

Wolfram Sang w.sang at pengutronix.de
Sat Dec 3 11:36:29 EST 2011


Debian has a release-critical bug filed against your project [1], because
'-Werror=format-security' [2] is used there to harden included software. The
following manually created patch is a standard way of resolving the bug, but
since I don't use your software I could not actually test it. It would be kind
of you if you could evaluate if this patch is applicable.

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=643363
[2] http://wiki.debian.org/Hardening#DEB_BUILD_HARDENING_FORMAT_.28gcc.2BAC8-g.2B-.2B-_-Wformat_-Wformat-security_-Werror.3Dformat-security.29

Signed-off-by: Wolfram Sang <w.sang at pengutronix.de>

--- CbcOrClpParam.cpp.orig	2011-12-03 17:15:35.000000000 +0100
+++ CbcOrClpParam.cpp	2011-12-03 17:16:39.000000000 +0100
@@ -1079,7 +1079,7 @@
           }
 #else
           if (CbcOrClpReadCommand == stdin) {
-               fprintf(stdout, coin_prompt);
+               fputs(coin_prompt, stdout);
                fflush(stdout);
           }
           where = fgets(line, 1000, CbcOrClpReadCommand);

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://list.coin-or.org/pipermail/clp/attachments/20111203/92e79267/attachment.sig>


More information about the Clp mailing list