packages/net/haproxy/patches/0005-BUG-MEDIUM-buffer-one-byte-miss-in-buffer-free-space.patch
heil a412694bbc haproxy: include patches from mainline
- [PATCH 3/9] BUG/MEDIUM: Do not consider an agent check as failed on
 - [PATCH 4/9] BUG/MEDIUM: peers: correctly configure the client timeout
 - [PATCH 5/9] BUG/MEDIUM: buffer: one byte miss in buffer free space
 - [PATCH 6/9] BUG/MAJOR: http: don't read past buffer's end in
 - [PATCH 7/9] BUG/MEDIUM: http: the function "(req|res)-replace-value"
 - [PATCH 8/9] BUG/MINOR: compression: consider the expansion factor in
 - [PATCH 9/9] BUG/MEDIUM: http: hdr_cnt would not count any header when

Signed-off-by: heil <heil@terminal-consulting.de>
2015-04-16 12:04:10 +02:00

30 lines
950 B
Diff

From b92902814f796bb1dc24bab2179000caceb5b151 Mon Sep 17 00:00:00 2001
From: Thierry FOURNIER <tfournier@exceliance.fr>
Date: Tue, 10 Mar 2015 01:55:01 +0100
Subject: [PATCH 5/9] BUG/MEDIUM: buffer: one byte miss in buffer free space
check
Space is not avalaible only if the end of the data inserted
is strictly greater than the end of buffer. If these two value
are equal, the space is avamaible.
(cherry picked from commit fdda6777bffb4f933569c609ba54e24ea5eabf29)
---
src/buffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/buffer.c b/src/buffer.c
index 9037dd3..8d2644e 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -46,7 +46,7 @@ int buffer_replace2(struct buffer *b, char *pos, char *end, const char *str, int
delta = len - (end - pos);
- if (bi_end(b) + delta >= b->data + b->size)
+ if (bi_end(b) + delta > b->data + b->size)
return 0; /* no space left */
if (buffer_not_empty(b) &&
--
2.0.5