summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2025-12-11 13:43:54 +0300
committerAndrew Morton <akpm@linux-foundation.org>2026-01-21 06:44:19 +0300
commit8118f197b7b738285eb4b66a80d01a5c8f35e231 (patch)
treedaf171044b7a6dddd53a737499fd2aacd9e43cee /include/linux
parent436debc9cad892576d4f3287446b64474922764c (diff)
downloadlinux-8118f197b7b738285eb4b66a80d01a5c8f35e231.tar.xz
mm: fix benign off-by-one bugs
We were wasting a byte due to an off-by-one bug. s[c]nprintf() doesn't write more than $2 bytes including the null byte, so trying to pass 'size-1' there is wasting one byte. Link: https://lkml.kernel.org/r/9c38dd009c17b0219889c7089d9bdde5aaf28a8e.1765449750.git.alx@kernel.org Signed-off-by: Alejandro Colomar <alx@kernel.org> Acked-by: Marco Elver <elver@google.com> Cc: Kees Cook <kees@kernel.org> Cc: Christopher Bazley <chris.bazley.wg14@gmail.com> Cc: Alexander Potapenko <glider@google.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Jann Horn <jannh@google.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Michal Hocko <mhocko@suse.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Maciej W. Rozycki <macro@orcam.me.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions