Skip to content

Commit

Permalink
fix - protect from uncontrolled format string
Browse files Browse the repository at this point in the history
  • Loading branch information
oshai committed Dec 18, 2023
1 parent 433d4c3 commit 24baa34
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import platform.posix.stderr
public object ConsoleOutputAppender : FormattingAppender() {
override fun logFormattedMessage(loggingEvent: KLoggingEvent, formattedMessage: Any?) {
if (loggingEvent.level == Level.ERROR) {
fprintf(stderr, "$formattedMessage\n")
fprintf(stderr, "%s\n", formattedMessage.toString())
} else {
println(formattedMessage)
}
Expand Down

0 comments on commit 24baa34

Please sign in to comment.