projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e94d70c
)
Check for more parse errors when reading dicts. Bug found by Coverity
author
Alan T. DeKok
<aland@freeradius.org>
Thu, 6 Sep 2012 09:32:16 +0000
(11:32 +0200)
committer
Alan T. DeKok
<aland@freeradius.org>
Thu, 6 Sep 2012 09:33:25 +0000
(11:33 +0200)
src/lib/dict.c
patch
|
blob
|
history
diff --git
a/src/lib/dict.c
b/src/lib/dict.c
index
d5cae2d
..
e225451
100644
(file)
--- a/
src/lib/dict.c
+++ b/
src/lib/dict.c
@@
-1661,6
+1661,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\"",