BUG/MAJOR: buffer: fix incorrect check in __b_putblk()

This function was split in two at commit f7d0447 ("MINOR: buffers:
split b_putblk() into __b_putblk()") but it's wrong, the first half's
length is not adjusted to the requested size so it copies more than
desired.

This is purely 1.9-specific, no backport is needed.
diff --git a/include/common/buf.h b/include/common/buf.h
index 9647262..a1355e6 100644
--- a/include/common/buf.h
+++ b/include/common/buf.h
@@ -494,6 +494,9 @@
 {
 	size_t half = b_contig_space(b);
 
+	if (half > len)
+		half = len;
+
 	memcpy(b_tail(b), blk, half);
 
 	if (len > half)