Compare commits

..

3 Commits

Author SHA1 Message Date
Asterisk Development Team
a85124d963 Update for 21.4.1 2024-07-25 15:25:40 +00:00
George Joseph
1090fc1315 rtp_engine.c: Prevent segfault in ast_rtp_codecs_payloads_unset()
There can be empty slots in payload_mapping_tx corresponding to
dynamic payload types that haven't been seen before so we now
check for NULL before attempting to use 'type' in the call to
ast_format_cmp.

Note: Currently only chan_sip calls ast_rtp_codecs_payloads_unset()

Resolves: #822
2024-07-25 09:19:56 -06:00
George Joseph
5513a07969 voicemail.conf.sample: Fix ':' comment typo
...and removed an errant trailing space.

Resolves: #819
2024-07-25 09:19:44 -06:00
5 changed files with 87 additions and 9 deletions

View File

@@ -1 +1 @@
21.4.0
21.4.1

View File

@@ -1 +1 @@
ChangeLogs/ChangeLog-21.4.0.md
ChangeLogs/ChangeLog-21.4.1.md

View File

@@ -0,0 +1,69 @@
## Change Log for Release asterisk-21.4.1
### Links:
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-21.4.1.md)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/21.4.0...21.4.1)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-21.4.1.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
### Summary:
- Commits: 2
- Commit Authors: 1
- Issues Resolved: 2
- Security Advisories Resolved: 0
### User Notes:
### Upgrade Notes:
### Commit Authors:
- George Joseph: (2)
## Issue and Commit Detail:
### Closed Issues:
- 819: [bug]: Typo in voicemail.conf.sample that stops it from loading when using "make samples"
- 822: [bug]: segfault in main/rtp_engine.c:1489 after updating 20.8.1 -> 20.9.0
### Commits By Author:
- #### George Joseph (2):
- voicemail.conf.sample: Fix ':' comment typo
- rtp_engine.c: Prevent segfault in ast_rtp_codecs_payloads_unset()
### Commit List:
- rtp_engine.c: Prevent segfault in ast_rtp_codecs_payloads_unset()
- voicemail.conf.sample: Fix ':' comment typo
### Commit Details:
#### rtp_engine.c: Prevent segfault in ast_rtp_codecs_payloads_unset()
Author: George Joseph
Date: 2024-07-25
There can be empty slots in payload_mapping_tx corresponding to
dynamic payload types that haven't been seen before so we now
check for NULL before attempting to use 'type' in the call to
ast_format_cmp.
Note: Currently only chan_sip calls ast_rtp_codecs_payloads_unset()
Resolves: #822
#### voicemail.conf.sample: Fix ':' comment typo
Author: George Joseph
Date: 2024-07-24
...and removed an errant trailing space.
Resolves: #819

View File

@@ -144,7 +144,7 @@ maxlogins=3
; -----------------------------------------------------------------------------
; Voicemail can be stored in a database using the ODBC driver.
;
: Storage database:
; Storage database:
; The value of odbcstorage is the database connection configured in
; res_odbc.conf. This may be different from the name of the ODBC DSN
; in /etc/odbc.ini which, in turn, may be different from the name of the
@@ -219,7 +219,7 @@ maxlogins=3
; the file to write to the 'recording' column will be the first format
; listed in the 'format' option in this config file. If the first
; format is 'wav49', the file to add to the database will be the one
; with the 'WAV' extension.
; with the 'WAV' extension.
; odbc_audio_on_disk = no

View File

@@ -1485,12 +1485,21 @@ void ast_rtp_codecs_payloads_unset(struct ast_rtp_codecs *codecs, struct ast_rtp
if (payload < AST_VECTOR_SIZE(&codecs->payload_mapping_tx)) {
type = AST_VECTOR_GET(&codecs->payload_mapping_tx, payload);
/* remove the preferred format if we are unsetting its container. */
if (ast_format_cmp(type->format, codecs->preferred_format) == AST_FORMAT_CMP_EQUAL) {
ao2_replace(codecs->preferred_format, NULL);
/*
* Remove the preferred format if we are unsetting its container.
*
* There can be empty slots in payload_mapping_tx corresponding to
* dynamic payload types that haven't been seen before so we need
* to check for NULL before attempting to use 'type' in the call to
* ast_format_cmp.
*/
if (type) {
if (ast_format_cmp(type->format, codecs->preferred_format) == AST_FORMAT_CMP_EQUAL) {
ao2_replace(codecs->preferred_format, NULL);
}
ao2_ref(type, -1);
AST_VECTOR_REPLACE(&codecs->payload_mapping_tx, payload, NULL);
}
ao2_cleanup(type);
AST_VECTOR_REPLACE(&codecs->payload_mapping_tx, payload, NULL);
}
if (instance && instance->engine && instance->engine->payload_set) {