Skip to content

Commit ebb3466

Browse files
committed
kprint: set a minimum buffer size of line width + 1
1 parent 0076e68 commit ebb3466

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/include/kprint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* The earliest possible print function (requires no heap, global ctors etc.)
2727
**/
2828
inline void kprintf(const char* format, ...) {
29-
int bufsize = strlen(format) * 2;
29+
int bufsize = std::max(strlen(format) * 2, 81u);
3030
char buf[bufsize];
3131
va_list aptr;
3232
va_start(aptr, format);

0 commit comments

Comments
 (0)