Browse Source

[mod_wstunnel] use buffer_string_length()

use buffer_string_length() abstraction instead of b->used
personal/stbuehler/fix-fdevent
Glenn Strauss 3 years ago
parent
commit
d7cfc8a381
  1. 2
      src/mod_wstunnel.c

2
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;

Loading…
Cancel
Save