diff options
| author | Dan Carpenter <[email protected]> | 2021-11-05 13:45:12 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2021-11-06 13:30:43 -0700 |
| commit | a88e03cf3d190cf46bc4063a9b7efe87590de5f4 (patch) | |
| tree | 1ebbdecc2f00893fbcdfc066c0bedf04731265bc /scripts/gdb/linux/config.py | |
| parent | 4aabdc14c4d2a01c2968bdc8919f81d9f9b4f790 (diff) | |
zram: off by one in read_block_state()
snprintf() returns the number of bytes it would have printed if there
were space. But it does not count the NUL terminator. So that means
that if "count == copied" then this has already overflowed by one
character.
This bug likely isn't super harmful in real life.
Link: https://lkml.kernel.org/r/20210916130404.GA25094@kili
Fixes: c0265342bff4 ("zram: introduce zram memory tracking")
Signed-off-by: Dan Carpenter <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: Sergey Senozhatsky <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/config.py')
0 files changed, 0 insertions, 0 deletions