From: Alan T. DeKok Date: Tue, 1 Mar 2011 15:58:57 +0000 (+0100) Subject: Be more forgiving about policy parsing X-Git-Tag: release_2_1_11~104 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d85a449d996267d8c6a22328f4846e25cdbf625;p=thirdparty%2Ffreeradius-server.git Be more forgiving about policy parsing --- diff --git a/src/modules/rlm_policy/parse.c b/src/modules/rlm_policy/parse.c index 8bc9c641c24..2992ab4d1e6 100644 --- a/src/modules/rlm_policy/parse.c +++ b/src/modules/rlm_policy/parse.c @@ -141,7 +141,6 @@ static const char *policy_lex_string(const char *input, char *buffer, size_t buflen) { rad_assert(input != NULL); - rad_assert(buffer != NULL); switch (*input) { case '\0': @@ -373,7 +372,7 @@ static const char *policy_lex_string(const char *input, return input + 1; case '"': - if (buflen < 2) { + if (!buffer || (buflen < 2)) { *token = POLICY_LEX_BAD; return input + 1; }