Skip to content

Commit ae3c03b

Browse files
committed
anonymous inode: fix kbuf size for nul
1 parent d840b0c commit ae3c03b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel_module/anonymous_inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ static u32 myval = 1;
1616

1717
static ssize_t read(struct file *filp, char __user *buf, size_t len, loff_t *off)
1818
{
19-
char kbuf[8];
19+
char kbuf[9];
2020
size_t ret;
2121

2222
ret = snprintf(kbuf, sizeof(kbuf), "%x", myval);

0 commit comments

Comments
 (0)