]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Be more forgiving about policy parsing
authorAlan T. DeKok <aland@freeradius.org>
Tue, 1 Mar 2011 15:58:57 +0000 (16:58 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 1 Mar 2011 15:58:57 +0000 (16:58 +0100)
src/modules/rlm_policy/parse.c

index 8bc9c641c24164d27ff7e57d27e2e5fecba30715..2992ab4d1e6d3777488f49a4b679b9aabc89f488 100644 (file)
@@ -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;
                }