commit | f07c9a79f06cd33b1c9c2c4eacb60bafa7e3f310 | [log] [tgz] |
---|---|---|
author | Jim Meyering <jim@meyering.net> | Thu Apr 26 18:35:12 2012 +0200 |
committer | Josef Bacik <josef@redhat.com> | Wed May 30 10:23:31 2012 -0400 |
tree | 73e493a66005d90f73d00cb3b09c6dc8fd5c18a2 | |
parent | 2eec6c8102c62c540c637176271cfdb13d828d7b [diff] |
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>