From 6b80d4913b5d2a4ebbfd176a11c66a4726a42381 Mon Sep 17 00:00:00 2001 From: Craig Tiller <craig.tiller@gmail.com> Date: Wed, 18 Nov 2015 07:05:54 -0800 Subject: [PATCH] Edge case cleanup --- src/core/support/slice_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/support/slice_buffer.c b/src/core/support/slice_buffer.c index 17c0b6c0f6..856d3a2439 100644 --- a/src/core/support/slice_buffer.c +++ b/src/core/support/slice_buffer.c @@ -220,7 +220,7 @@ void gpr_slice_buffer_move_first(gpr_slice_buffer *src, size_t n, return; } src_idx = 0; - for (;;) { + while (src_idx < src->capacity) { gpr_slice slice = src->slices[src_idx]; size_t slice_len = GPR_SLICE_LENGTH(slice); if (n > slice_len) { -- GitLab