diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/buffer.c | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -12,6 +12,7 @@ NEWS * [mod_magnet] fix memory leak * add comments for switch fall throughs * remove logical dead code + * [buffer] fix length check in buffer_is_equal_right_len - 1.4.34 * [mod_auth] explicitly link ssl for SHA1 (fixes #2517) diff --git a/src/buffer.c b/src/buffer.c index eea7041d..aac60b0a 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -584,7 +584,7 @@ int buffer_is_equal_right_len(buffer *b1, buffer *b2, size_t len) { if (b1->used == 0 || b2->used == 0) return 0; /* buffers too small -> not equal */ - if (b1->used - 1 < len || b1->used - 1 < len) return 0; + if (b1->used - 1 < len || b2->used - 1 < len) return 0; if (0 == strncmp(b1->ptr + b1->used - 1 - len, b2->ptr + b2->used - 1 - len, len)) { |