summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorDon Lewis <truckman@apache.org>2016-08-31 16:12:32 +0000
committerDon Lewis <truckman@apache.org>2016-08-31 16:12:32 +0000
commit7204bffa5c633d7bc2064e3c643dbacfab79e281 (patch)
treef29dd0ae5a5c7cdfc79a9df459040ee344321c4f /extensions
parente64b208bc03ba75fcc353d5f55d19666cda390d8 (diff)
Fix -Wformat-security warnings.
There are a number of instances where the code calls *printf() to print arbitrary strings and the string is passed as the format argument to *printf(). Since these strings might contain % conversion sequences, this is a security hazard. Fix the problem by printing the strings with a "%s" format.
Notes
Notes: prefer: e456a0804052a0ad0a4daef4fad9c5205bd7aa60
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/logging/consolehandler.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/extensions/source/logging/consolehandler.cxx b/extensions/source/logging/consolehandler.cxx
index d2c0877b39fc..60440bd6b8b2 100644
--- a/extensions/source/logging/consolehandler.cxx
+++ b/extensions/source/logging/consolehandler.cxx
@@ -245,9 +245,9 @@ namespace logging
return sal_False;
if ( _rRecord.Level >= m_nThreshold )
- fprintf( stderr, sEntry.getStr() );
+ fprintf( stderr, "%s", sEntry.getStr() );
else
- fprintf( stdout, sEntry.getStr() );
+ fprintf( stdout, "%s", sEntry.getStr() );
return sal_True;
}