BUG/MEDIUM: buffers: Make sure we don't wrap in ci_insert_line2/b_rep_blk.
In ci_insert_line2() and b_rep_blk(), we can't afford to wrap, so don't use
b_tail() to check if we do, use __b_tail() instead.
This should be backported to previous versions.
diff --git a/include/common/buf.h b/include/common/buf.h
index 4208820..d39de71 100644
--- a/include/common/buf.h
+++ b/include/common/buf.h
@@ -578,7 +578,7 @@
delta = len - (end - pos);
- if (b_tail(b) + delta > b_wrap(b))
+ if (__b_tail(b) + delta > b_wrap(b))
return 0; /* no space left */
if (b_data(b) &&