mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-25 22:18:07 +00:00
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
This commit is contained in:
committed by
Joshua Colp
parent
d7ee89b499
commit
894071ea2c
@@ -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 ?
|
||||
|
||||
Reference in New Issue
Block a user