mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
ksprintf() should null-terminate strings.
This commit is contained in:
parent
c149d2a8f0
commit
6ab0649ad6
Notes:
sideshowbarker
2024-07-19 18:46:18 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/6ab0649ad69
1 changed files with 1 additions and 0 deletions
|
@ -140,6 +140,7 @@ int ksprintf(char* buffer, const char* fmt, ...)
|
|||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
int ret = kprintfInternal(buffer_putch, buffer, fmt, ap);
|
||||
buffer[ret] = '\0';
|
||||
va_end(ap);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue