[Ocfs2-tools-devel] Compilation errors with -Werror=format-security
Jeremy Lainé
jeremy.laine at m4x.org
Sat Oct 8 00:21:59 PDT 2011
Hello,
I am the maintainer for the Debian ocfs2-tools package, and am having trouble getting
ocfs2-tools now that the default GCC options include "-Werror=format-security".
The attached patch goes some way towards getting ocfs2-tools to compile, but I do not
understand what the "query_run" method in "tunefs.ocfs2/op_query.c" does:
query_fs = fs;
fprintf(stdout, fmt);
query_fs = NULL;
=> is "fmt" actually a format string, and if so, why does the fprintf call not have any
arguments? Is fprintf being abused here?
Also, I noticed a number of snprintf calls of the form:
snprintf (sysfile, sizeof(sysfile),
ocfs2_system_inodes[JOURNAL_SYSTEM_INODE].si_name, i);
Is "ocfs2_system_inodes[JOURNAL_SYSTEM_INODE].si_name" actually a format string?
Many thanks in advance,
Jeremy Lainé
-------------- next part --------------
A non-text attachment was scrubbed...
Name: format-security.patch
Type: text/x-patch
Size: 5665 bytes
Desc: not available
Url : http://oss.oracle.com/pipermail/ocfs2-tools-devel/attachments/20111008/78491a21/attachment.bin
More information about the Ocfs2-tools-devel
mailing list