touchlab / Kermit

Kermit by Touchlab is a Kotlin Multiplatform centralized logging utility.
https://kermit.touchlab.co
Apache License 2.0
725 stars 41 forks source link

Fix crash when passing %n #294

Closed mrf7 closed 1 year ago

mrf7 commented 2 years ago

Fix the crash and possible vulnerability by passing a static string as the message to _os_log_internal then using its string replacement to put the desired message in. Found solution in https://stackoverflow.com/a/64055996

Tested by passing %n as log message from both kotlin and swift in KaMPKit