[Cbc] Format string "error"

Christoph Cullmann cullmann at absint.com
Sat Mar 26 12:48:59 EDT 2016


Hi,

current clang++ from xcode will refuse to compile libcbc because of:

CoinMessageHandler.cpp:834:26: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
            sprintf(messageOut_,format_+2);

guess you want to use their either

sprintf(messageOut_,"%s",format_+2);

or avoid sprintf and just do some other dumb strcopy there.

Greetings
Christoph

-- 
----------------------------- Dr.-Ing. Christoph Cullmann ---------
AbsInt Angewandte Informatik GmbH      Email: cullmann at AbsInt.com
Science Park 1                         Tel:   +49-681-38360-22
66123 Saarbrücken                      Fax:   +49-681-38360-20
GERMANY                                WWW:   http://www.AbsInt.com
--------------------------------------------------------------------
Geschäftsführung: Dr.-Ing. Christian Ferdinand
Eingetragen im Handelsregister des Amtsgerichts Saarbrücken, HRB 11234



More information about the Cbc mailing list