From cde596bbff0f6fae6098f07dfb2dd1f7e5532577 Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Sat, 12 Mar 2022 15:18:59 +0100 Subject: [PATCH] Re-fix my mistaken typo (#2841) This was noted by dentarg, thank you so much! [changelog skip] --- ext/puma_http11/puma_http11.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/puma_http11/puma_http11.c b/ext/puma_http11/puma_http11.c index 19242dd4..35c70812 100644 --- a/ext/puma_http11/puma_http11.c +++ b/ext/puma_http11/puma_http11.c @@ -41,8 +41,8 @@ static VALUE global_request_path; /** Defines common length and error messages for input length validation. */ #define QUOTE(s) #s -#define EXPLAIN_MAX_LENGTH_VALUE(s) QUOTE(s) -#define DEF_MAX_LENGTH(N,length) const size_t MAX_##N##_LENGTH = length; const char *MAX_##N##_LENGTH_ERR = "HTTP element " # N " is longer than the " EXPLAIN_MAX_LENGTH_VALUE(length) " allowed length (was %d)" +#define EXPAND_MAX_LENGTH_VALUE(s) QUOTE(s) +#define DEF_MAX_LENGTH(N,length) const size_t MAX_##N##_LENGTH = length; const char *MAX_##N##_LENGTH_ERR = "HTTP element " # N " is longer than the " EXPAND_MAX_LENGTH_VALUE(length) " allowed length (was %d)" /** Validates the max length of given input and throws an HttpParserError exception if over. */ #define VALIDATE_MAX_LENGTH(len, N) if(len > MAX_##N##_LENGTH) { rb_raise(eHttpParserError, MAX_##N##_LENGTH_ERR, len); }