From: Alan T. DeKok Date: Thu, 6 Sep 2012 09:32:16 +0000 (+0200) Subject: Check for more parse errors when reading dicts. Bug found by Coverity X-Git-Tag: release_2_2_0~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4afc8f539ee80c46eb73cfa4c5d905bc38bf199a;p=thirdparty%2Ffreeradius-server.git Check for more parse errors when reading dicts. Bug found by Coverity --- diff --git a/src/lib/dict.c b/src/lib/dict.c index 439f80ff9a9..c364e274f46 100644 --- a/src/lib/dict.c +++ b/src/lib/dict.c @@ -1253,6 +1253,12 @@ static int process_vendor(const char* fn, const int line, char **argv, length = (int) (p[2] - '0'); if (p[3] == ',') { + if (!p[4]) { + fr_strerror_printf("dict_init: %s[%d]: Invalid format for VENDOR. Expected text like \"1,1\", got \"%s\"", + fn, line, p); + return -1; + } + if ((p[4] != 'c') || (p[5] != '\0')) { fr_strerror_printf("dict_init: %s[%d]: Invalid format for VENDOR. Expected text like \"1,1\", got \"%s\"",