From d7cfc8a38117ef2368740fedaed3d38c43bf414b Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Fri, 23 Nov 2018 18:50:48 -0500 Subject: [PATCH] [mod_wstunnel] use buffer_string_length() use buffer_string_length() abstraction instead of b->used --- src/mod_wstunnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod_wstunnel.c b/src/mod_wstunnel.c index 8051e8a7..57cfb8bf 100644 --- a/src/mod_wstunnel.c +++ b/src/mod_wstunnel.c @@ -707,7 +707,7 @@ static int get_key_number(uint32_t *ret, const buffer *b) { uint32_t sp = 0; char tmp[10 + 1]; /* #define UINT32_MAX_STRLEN 10 */ - for (size_t i = 0, used = b->used; i < used; ++i) { + for (size_t i = 0, used = buffer_string_length(b); i < used; ++i) { if (light_isdigit(s[i])) { tmp[j] = s[i]; if (++j >= sizeof(tmp)) return -1;