From: Filipe David Borba Manana Date: Tue, 21 Jan 2014 23:36:38 +0000 (+0000) Subject: Btrfs: fix snprintf usage by send's gen_unique_name X-Git-Tag: v3.14-rc1~29^2~15 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f74b86d85533a98ef7f573487af38f9dd514becb;p=pandora-kernel.git Btrfs: fix snprintf usage by send's gen_unique_name The buffer size argument passed to snprintf must account for the trailing null byte added by snprintf, and it returns a value >= then sizeof(buffer) when the string can't fit in the buffer. Since our buffer has a size of 64 characters, and the maximum orphan name we can generate is 63 characters wide, we must pass 64 as the buffer size to snprintf, and not 63. Signed-off-by: Filipe David Borba Manana Reviewed-by: David Sterba Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- Reading git-diff-tree failed