summaryrefslogtreecommitdiff
path: root/main/config_options.c
diff options
context:
space:
mode:
authorGianluca Merlo <gianluca.merlo@gmail.com>2016-03-19 13:34:26 +0100
committerJoshua Colp <jcolp@digium.com>2016-03-24 11:15:30 -0500
commit894071ea2cedcc65e452cabfe3cd805daf5a6a1d (patch)
tree8838aaa889256d2f74560f25253d4eb763e50e42 /main/config_options.c
parentd7ee89b49950522f78afaca70d194f868f59321c (diff)
config: fix flags in uint option handler
The configuration unsigned integer option handler sets flags for the parser as if the option should be a signed integer (PARSE_INT32), leading to errors on "out of range" values. Fix flags (PARSE_UINT32). A fix to res_pjsip is also present which stops invalid flags from being passed when registering sorcery object fields for qualify status. ASTERISK-25612 #close Change-Id: I96b539336275e0e72a8e8033487d2c3344debd3e
Diffstat (limited to 'main/config_options.c')
-rw-r--r--main/config_options.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/config_options.c b/main/config_options.c
index f8c7b0c67..e59e5cf7a 100644
--- a/main/config_options.c
+++ b/main/config_options.c
@@ -1346,7 +1346,7 @@ static int int_handler_fn(const struct aco_option *opt, struct ast_variable *var
*/
static int uint_handler_fn(const struct aco_option *opt, struct ast_variable *var, void *obj) {
unsigned int *field = (unsigned int *)(obj + opt->args[0]);
- unsigned int flags = PARSE_INT32 | opt->flags;
+ unsigned int flags = PARSE_UINT32 | opt->flags;
int res = 0;
if (opt->flags & PARSE_IN_RANGE) {
res = opt->flags & PARSE_DEFAULT ?