Commit 2825abe2 authored by Kenton Varda's avatar Kenton Varda

Fix bug caught by clang address sanitizer, yay!

parent eeb93d83
......@@ -41,7 +41,7 @@ static kj::Maybe<HttpMethod> consumeHttpMethod(char*& ptr) {
char* p = ptr;
#define EXPECT_REST(prefix, suffix) \
if (memcmp(p, #suffix, sizeof(#suffix)-1) == 0) { \
if (strncmp(p, #suffix, sizeof(#suffix)-1) == 0) { \
ptr = p + (sizeof(#suffix)-1); \
return HttpMethod::prefix##suffix; \
} else { \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment