Skip to content

Commit f1a4ec6

Browse files
benlangmuircompnerd
authored andcommitted
[logging] Don't pass arbitrary string to NSLog
NSLog expects a format string, so don't pass it arbitrary log strings, which may contain format specifiers.
1 parent a4e0f48 commit f1a4ec6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/LSPLogging/Logging.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public final class Logger {
197197

198198
if !self.disableNSLog && !usedOSLog {
199199
// Fallback to NSLog if os_log isn't available.
200-
NSLog(message)
200+
NSLog("%@", message)
201201
} else {
202202
self.logToStderr(message, level: level)
203203
}

0 commit comments

Comments
 (0)