mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +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: 6ab0649ad6
1 changed files with 1 additions and 0 deletions
|
@ -140,6 +140,7 @@ int ksprintf(char* buffer, const char* fmt, ...)
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
int ret = kprintfInternal(buffer_putch, buffer, fmt, ap);
|
int ret = kprintfInternal(buffer_putch, buffer, fmt, ap);
|
||||||
|
buffer[ret] = '\0';
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue