how to fix this qt code for format-security flag FTBFS

Florian Weimer fweimer at redhat.com
Wed Dec 4 14:47:28 UTC 2013


On 12/04/2013 03:26 PM, Parag N(पराग़) wrote:

>    I got a format-security flag FTBFS bug[1] for fontmatrix package
> which I maintain in Fedora. I am confused on how to fix line 86 qDebug()
> from http://fpaste.org/58952/13861663/ to fix this FTBFS.
>    Can someone help to fix this?

This should do it:

   qDebug("%s", ds.arg(glyph)
                .arg(log)
                .arg(xadvance)
                .arg(yadvance)
                .arg(xoffset)
                .arg(yoffset)
                .arg(QChar(lChar))
                .arg(hyphen.first.count())
                .toLocal8Bit().data());

The original version relied on the operator char *() overload of 
QByteArray, but that isn't applied in a vararg context.

-- 
Florian Weimer / Red Hat Product Security Team


More information about the devel mailing list