]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
unit_test_attribute: Only consider '-' special if it's at the end of a line
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 17 Mar 2020 04:03:39 +0000 (00:03 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 17 Mar 2020 04:03:39 +0000 (00:03 -0400)
src/bin/unit_test_attribute.c

index 31794f57659323f4d0fb9b9601913cf46a4cb84b..5cbf7d36eb19c8f301d643578ff5a8aab0e94532 100644 (file)
@@ -2092,7 +2092,7 @@ size_t process_line(command_result_t *result, command_ctx_t *cc, char *data, siz
        /*
         *      Feed the data buffer in as the command
         */
-       if (*p == '-') {
+       if ((p[0] == '-') && ((p[1] == ' ') || (p[1] == '\0'))) {
                data_used = command->func(result, cc, data, data_used, data, data_used);
        }
        else {