]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: avoid buffer overrun in btrfs_printk
authorJim Meyering <jim@meyering.net>
Thu, 26 Apr 2012 16:35:12 +0000 (18:35 +0200)
committerJosef Bacik <josef@redhat.com>
Wed, 30 May 2012 14:23:31 +0000 (10:23 -0400)
commit13152f6739c1c0de9bff2910d92cd236ce2bd1e0
tree73e493a66005d90f73d00cb3b09c6dc8fd5c18a2
parentc6f74c7741661534d720cc05a1c86f597b3b4807
Btrfs: avoid buffer overrun in btrfs_printk

The buffer read-overrun would be triggered by a printk format
starting with <N>, where N is a single digit.  NUL-terminate
after strncpy.  Use memcpy, not strncpy, since we know the
string we're copying fits in the destination buffer and
contains no NUL byte.

Signed-off-by: Jim Meyering <meyering@redhat.com>
fs/btrfs/super.c