Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 838704 Details for
Bug 1037248
pki-core FTBFS if "-Werror=format-security" flag is used
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Convert '-Wformat-security' warning to '-Werror=format-security' error
20131216-Convert-format-security-warning-to-error.patch (text/plain), 3.38 KB, created by
Matthew Harmsen
on 2013-12-19 00:17:41 UTC
(
hide
)
Description:
Convert '-Wformat-security' warning to '-Werror=format-security' error
Filename:
MIME Type:
Creator:
Matthew Harmsen
Created:
2013-12-19 00:17:41 UTC
Size:
3.38 KB
patch
obsolete
>From a83ac7c92a3c388c963783302f7865d04f7160eb Mon Sep 17 00:00:00 2001 >From: Matthew Harmsen <mharmsen@redhat.com> >Date: Mon, 16 Dec 2013 15:17:57 -0800 >Subject: [PATCH] Replace '-Wformat-security' warning with > '-Werror=format-security' error > >Bugzilla Bug #1037248 - pki-core FTBFS if "-Werror=format-security" flag is used >Bugzilla Bug #1037249 - pki-tps FTBFS if "-Werror=format-security" flag is used >--- > base/native-tools/src/tkstool/secutil.c | 4 ++-- > base/tps/src/modules/tps/AP_Context.cpp | 4 ++-- > cmake/Modules/DefineCompilerFlags.cmake | 4 +++- > 3 files changed, 7 insertions(+), 5 deletions(-) > >diff --git a/base/native-tools/src/tkstool/secutil.c b/base/native-tools/src/tkstool/secutil.c >index 9ece007..9cf2c37 100644 >--- a/base/native-tools/src/tkstool/secutil.c >+++ b/base/native-tools/src/tkstool/secutil.c >@@ -1003,7 +1003,7 @@ secu_PrintTime(FILE *out, int64 time, char *m, int level) > } > > PR_FormatTime(timeString, 100, "%a %b %d %H:%M:%S %Y", &printableTime); >- fprintf(out, timeString); >+ fprintf(out, "%s", timeString); > > if (m != NULL) > fprintf(out, "\n"); >@@ -2584,7 +2584,7 @@ SECU_PrintCRLInfo(FILE *out, CERTCrl *crl, char *m, int level) > iv = 0; > while ((entry = crl->entries[iv++]) != NULL) { > sprintf(om, "Entry (%x):\n", iv); >- SECU_Indent(out, level + 1); fprintf(out, om); >+ SECU_Indent(out, level + 1); fprintf(out, "%s", om); > SECU_PrintInteger(out, &(entry->serialNumber), "Serial Number", > level + 2); > SECU_PrintTimeChoice(out, &(entry->revocationDate), >diff --git a/base/tps/src/modules/tps/AP_Context.cpp b/base/tps/src/modules/tps/AP_Context.cpp >index b7e0242..beb5733 100644 >--- a/base/tps/src/modules/tps/AP_Context.cpp >+++ b/base/tps/src/modules/tps/AP_Context.cpp >@@ -55,7 +55,7 @@ void AP_Context::LogError( const char *func, int line, const char *fmt, ... ) > PR_vsnprintf( buf, MAX_LOG_MSG_SIZE, fmt, argp ); > va_end( argp ); > >- ap_log_error( func, line, APLOG_MODULE_INDEX, APLOG_ERR, 0, m_sv, buf ); >+ ap_log_error( func, line, APLOG_MODULE_INDEX, APLOG_ERR, 0, m_sv, "%s", buf ); > } > > >@@ -68,7 +68,7 @@ void AP_Context::LogInfo( const char *func, int line, const char *fmt, ... ) > PR_vsnprintf( buf, MAX_LOG_MSG_SIZE, fmt, argp ); > va_end( argp ); > >- ap_log_error( func, line, APLOG_MODULE_INDEX, APLOG_INFO, 0, m_sv, buf ); >+ ap_log_error( func, line, APLOG_MODULE_INDEX, APLOG_INFO, 0, m_sv, "%s", buf ); > } > > >diff --git a/cmake/Modules/DefineCompilerFlags.cmake b/cmake/Modules/DefineCompilerFlags.cmake >index 04ed1bf..10d30f1 100644 >--- a/cmake/Modules/DefineCompilerFlags.cmake >+++ b/cmake/Modules/DefineCompilerFlags.cmake >@@ -11,7 +11,9 @@ if (UNIX AND NOT WIN32) > # add -Wconversion ? > #set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -pedantic -pedantic-errors") > set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wshadow -Wmissing-prototypes -Wdeclaration-after-statement") >- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused -Wfloat-equal -Wpointer-arith -Wwrite-strings -Wformat-security") >+ # FESCo Ticket #1185 (https://fedorahosted.org/fesco/ticket/1185): >+ # replace '-Wformat-security' with '-Werror=format-security' >+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused -Wfloat-equal -Wpointer-arith -Wwrite-strings -Werror=format-security") > set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-format-attribute") > > # with -fPIC >-- >1.8.4.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1037248
: 838704