mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Audit improper usage of scheduler exposed by 5c713fdf18
. (v13 additions)
chan_sip.c: * Initialize mwi subscription scheduler ids earlier because of ASTOBJ to ao2 conversion. * Initialize register scheduler ids earlier because of ASTOBJ to ao2 conversion. chan_skinny.c: * Fix more scheduler usage for the valid 0 id value. ASTERISK-25476 Change-Id: If9f0e5d99638b2f9d102d1ebc9c5a14b2d706e95
This commit is contained in:
@@ -9374,6 +9374,9 @@ static int sip_register(const char *value, int lineno)
|
||||
return -1;
|
||||
}
|
||||
|
||||
reg->expire = -1;
|
||||
reg->timeout = -1;
|
||||
|
||||
if (ast_string_field_init(reg, 256)) {
|
||||
ao2_t_ref(reg, -1, "failed to string_field_init, drop reg");
|
||||
return -1;
|
||||
@@ -9447,6 +9450,8 @@ static int sip_subscribe_mwi(const char *value, int lineno)
|
||||
return -1;
|
||||
}
|
||||
|
||||
mwi->resub = -1;
|
||||
|
||||
if (ast_string_field_init(mwi, 256)) {
|
||||
ao2_t_ref(mwi, -1, "failed to string_field_init, drop mwi");
|
||||
return -1;
|
||||
@@ -9461,7 +9466,6 @@ static int sip_subscribe_mwi(const char *value, int lineno)
|
||||
}
|
||||
ast_string_field_set(mwi, hostname, hostname);
|
||||
ast_string_field_set(mwi, mailbox, mailbox);
|
||||
mwi->resub = -1;
|
||||
mwi->portno = portnum;
|
||||
mwi->transport = transport;
|
||||
|
||||
|
Reference in New Issue
Block a user