diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2010-05-20 17:35:10 +0200 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2010-05-20 17:35:10 +0200 |
commit | 36c1650b19577a23cee2b75c4db85dcae65608fe (patch) | |
tree | 45b086b46b1c65022037b78f57314490c29c6359 /src | |
parent | c2d10df6e7e0f371c07fb86bd1ed9760e92989b0 (diff) | |
download | strongswan-36c1650b19577a23cee2b75c4db85dcae65608fe.tar.bz2 strongswan-36c1650b19577a23cee2b75c4db85dcae65608fe.tar.xz |
range check for configuration attribute types
Diffstat (limited to 'src')
-rw-r--r-- | src/libhydra/plugins/attr_sql/pool_attributes.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libhydra/plugins/attr_sql/pool_attributes.c b/src/libhydra/plugins/attr_sql/pool_attributes.c index 52314aa89..7ee207536 100644 --- a/src/libhydra/plugins/attr_sql/pool_attributes.c +++ b/src/libhydra/plugins/attr_sql/pool_attributes.c @@ -232,6 +232,12 @@ static bool parse_attributes(char *name, char *value, value_type_t *value_type, free(blob->ptr); return FALSE; } + if (*type < 1 || *type > 32767) + { + fprintf(stderr, "the attribute type must lie in the range 1..32767.\n"); + free(blob->ptr); + return FALSE); + } if (*value_type == VALUE_NONE) { *value_type = VALUE_HEX; |