On Tue, Jan 21, 2014 at 11:36:38PM +0000, Filipe David Borba Manana wrote:
> 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 <fdman...@gmail.com>

JFYI, I have a patch to do the same plus cleans the code around, but
it's part of a bigger series that's in testing atm, so I haven't sent it
yet.

Consider it
Reviewed-by: David Sterba <dste...@suse.cz>

I'll update my version.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to