Commit graph

30116 commits

Author SHA1 Message Date
Joshua Colp
698ff5b4cb Merge "res_pjproject.c: Fix ast_strdup() alloc failure." 2017-11-08 07:38:45 -06:00
Jenkins2
b7f64c30e2 Merge "stream: Return error from ast_stream_topology_set_stream." 2017-11-08 06:06:51 -06:00
Joshua Colp
d91d0e992d Merge "res_stasis: Fix multiple leaks." 2017-11-08 04:58:12 -06:00
Jenkins2
0129e396b2 Merge "res_pjsip_outbound_registration: Fix leak on vector add failure." 2017-11-07 20:39:31 -06:00
Jenkins2
ca5bffb305 Merge "res_pjsip_exten_state: Check for vector append failure." 2017-11-07 20:06:27 -06:00
Jenkins2
ebd9e5c8c3 Merge "res_pjsip_config_wizard: Fix leaks and add check for malloc failure." 2017-11-07 19:41:46 -06:00
Jenkins2
13ffdfd96a Merge "res_stasis_playback: Check for failure to append vector." 2017-11-07 19:02:20 -06:00
Jenkins2
d6213397f0 Merge "res_pjsip: Fix leak on error in ast_sip_auth_vector_init." 2017-11-07 18:14:28 -06:00
Jenkins2
250d905fc3 Merge "test_sorcery_memory_cache_thrash: Handle error from vector append." 2017-11-07 17:32:48 -06:00
Jenkins2
2dcd0c8a05 Merge "stasis: Release object if vector append fails." 2017-11-07 16:40:50 -06:00
Jenkins2
759f4c1125 Merge "res_ari_events: Fix use after free / double-free of JSON message." 2017-11-07 16:10:11 -06:00
Jenkins2
bd67e63434 Merge "PBX: Handle errors from AST_VECTOR_APPEND." 2017-11-07 15:27:26 -06:00
Jenkins2
64fa84b2ca Merge "Messaging: Report error on failure to register tech or handler." 2017-11-07 14:58:05 -06:00
Jenkins2
3d5aa21fe5 Merge "format_cap: Fix leak on AST_VECTOR_APPEND error." 2017-11-07 14:20:02 -06:00
Jenkins2
b52d53b6dc Merge "CLI: Remove unused internal command." 2017-11-07 13:02:30 -06:00
Jenkins2
fdba5fce58 Merge "res_pjsip: Avoid crash when contact uri is empty string" 2017-11-07 12:08:44 -06:00
Jenkins2
06746b0af5 Merge "res_pjsip: Ignore empty TLS configuration" 2017-11-07 11:05:13 -06:00
Corey Farrell
fb18895108 stream: Return error from ast_stream_topology_set_stream.
ast_stream_topology_set_stream had suppressed error codes from
AST_VECTOR_APPEND.  The result of AST_VECTOR_APPEND needs to be returned
to the caller so they can take appropriate action on the stream.

Change-Id: I6c0d12755743eadba1357f6153526cc055592856
2017-11-07 11:28:53 -05:00
Corey Farrell
801094da7b res_stasis: Fix multiple leaks.
* res/stasis/app.c JSON passed to app_send needs to be released.
* res/stasis_message.c: objects leak if vector append fails.

Change-Id: I8dd5385b9f50a5cadf2b1d16efecffd6ddb4db4a
2017-11-07 11:24:48 -05:00
Joshua Colp
3c897daabf Merge "tcptls: Print notice when TLS is enabled but not configured." 2017-11-07 10:12:41 -06:00
Joshua Colp
83c61383c8 Merge "stasis: Remove silly use of RAII_VAR in stasis_forward_all." 2017-11-07 09:32:45 -06:00
Joshua Colp
a34b36c513 Merge "stasis_channels.c: Remove a very silly RAII_VAR()." 2017-11-07 08:44:12 -06:00
Joshua Colp
a576d7c2e4 Merge "stasis/app.c: Optimize stasis_app_get_debug_by_name()" 2017-11-07 07:57:39 -06:00
Joshua Colp
e7c52d1b61 Merge "Fix ast_(v)asprintf() malloc failure usage conditions." 2017-11-07 07:18:12 -06:00
Richard Mudgett
02329b9a34 res_pjproject.c: Fix ast_strdup() alloc failure.
Change-Id: I74688038e7afe3a279359cce53aadb28ade51ead
2017-11-07 08:11:32 -05:00
Aaron An
a36d8cc533 res_pjsip: Avoid crash when contact uri is empty string
Asterisk will crash if contact uri is invalid, so contact_apply_handler
should check if the uri is NULL or empty.

ASTERISK-27393 #close
Reported-by: Aaron An
Tested-by: AaronAn

Change-Id: Ia0309bdc6b697c73c9c736e1caec910b77ca69f5
2017-11-07 08:01:08 -05:00
Joshua Colp
5407291ec6 Merge "RTP Engine: Deal with errors returned from AST_VECTOR_REPLACE." 2017-11-07 06:36:32 -06:00
Corey Farrell
7ef38d399a res_pjsip_outbound_registration: Fix leak on vector add failure.
Change-Id: I774b88b3c9da41edd4dc8d78f095481f52f2bd46
2017-11-06 18:55:00 -05:00
Corey Farrell
8684219f79 res_pjsip_exten_state: Check for vector append failure.
Release reference to publisher if we fail to add it to the vector.

Change-Id: I64dff3f481b67b9884f37cadba7a5ccf23d084f3
2017-11-06 18:48:06 -05:00
Corey Farrell
f899368cd6 res_pjsip_config_wizard: Fix leaks and add check for malloc failure.
wizard_apply_handler():
- Free host if we fail to add it to the vector.

wizard_mapped_observer():
- Check for otw allocation failure.
- Free otw if we fail to add it to the vector.

Change-Id: Ib5d3bcabbd9c24dd8a3c9cc692a794a5f60243ad
2017-11-06 18:44:01 -05:00
Corey Farrell
4016884ef3 res_stasis_playback: Check for failure to append vector.
Free resources and return error if we fail to append the vector in
stasis_app_control_play_uri.

Change-Id: I22c4a90dd859b253f2850c6511de48b25609422b
2017-11-06 18:38:35 -05:00
Corey Farrell
24b9751aaa test_sorcery_memory_cache_thrash: Handle error from vector append.
Cleanup resources when we fail to append the vector and report test
failure.

Change-Id: I6eb41586fd11dee8c0dfe35e91cb465a4cab7298
2017-11-06 18:33:13 -05:00
Corey Farrell
29205e7adc res_pjsip: Fix leak on error in ast_sip_auth_vector_init.
Change-Id: Ib0fc7a18f3135ca8990c3984c9e15f6d26e556e8
2017-11-06 18:28:35 -05:00
Corey Farrell
70fcc043bb res_pjproject: Handle error from adding to the buildopts vector.
Change-Id: I076c7bd207c7989a23005395ce1735392657be65
2017-11-06 18:17:13 -05:00
Corey Farrell
5247ba4b88 res_ari_events: Fix use after free / double-free of JSON message.
When stasis_app_message_handler needs to queue a message for a later
connection it needs to bump the message reference so it doesn't get
freed when the caller releases it's reference.

Change-Id: I82696df8fe723b3365c15c3f7089501da8daa892
2017-11-06 18:11:08 -05:00
Corey Farrell
adb4fdcb7b stasis: Release object if vector append fails.
Change-Id: I3e5cc669169aab6175ddfaf7486edeaeb4fdcfb1
2017-11-06 16:33:00 -05:00
Corey Farrell
2f4f216026 RTP Engine: Deal with errors returned from AST_VECTOR_REPLACE.
Check for errors from AST_VECTOR_REPLACE and clean memory if needed.

Change-Id: I124d15cc1d645f85a72a1279f623c1993b304b0b
2017-11-06 16:20:06 -05:00
Corey Farrell
5762f72425 PBX: Handle errors from AST_VECTOR_APPEND.
This resolves potentials leaks on AST_VECTOR_APPEND error in:
* ast_context_add_include2
* ast_context_add_switch2
* ast_context_add_ignorepat2

Change-Id: Ib60e95c4f622fa3b832d87227c0523a695d736b6
2017-11-06 16:16:35 -05:00
Corey Farrell
714026b32e Messaging: Report error on failure to register tech or handler.
Message tech and handler registrations use a vector which could fail to
expand.  If it does log and error and return error.

Change-Id: I593a8de81a07fb0452e9b0efd5d4018b77bca6f4
2017-11-06 16:10:56 -05:00
Corey Farrell
e43c8af77c format_cap: Fix leak on AST_VECTOR_APPEND error.
format_cap_framed_init can fail on AST_VECTOR_APPEND.  This should
report failure to the caller and clean the newly allocated frame.

Change-Id: Ica0661235bf09497bf23d844ceb01f21b41a55b0
2017-11-06 16:07:01 -05:00
Corey Farrell
64bcb65a78 stasis: Remove silly use of RAII_VAR in stasis_forward_all.
Change-Id: I46de4c968d40144d5b049966304ff66c1469fb65
2017-11-06 15:23:46 -05:00
Corey Farrell
b7e1034009 CLI: Remove unused internal command.
The internal CLI command "_command complete" was last used by Asterisk
0.2.0.  Since then we've been using "_command nummatches" and "_command
matchesarray".

Change-Id: I682fe1e21a24a3bb5bd04146e639f1c5866bcfce
2017-11-06 13:51:32 -05:00
Joshua Colp
637b37fb98 Merge "dtls: Add support for ephemeral DTLS certificates." 2017-11-06 12:22:38 -06:00
Richard Mudgett
f81970d3fc stasis_channels.c: Remove a very silly RAII_VAR().
Change-Id: I28b458b3c1a442c4ef0be7b4986a95ea4149e14f
2017-11-06 13:06:56 -05:00
Joshua Colp
3126c396b1 Merge "install_prereq: Checkout of libSRTP 2.x." 2017-11-06 11:57:58 -06:00
Richard Mudgett
9771f089f5 stasis/app.c: Optimize stasis_app_get_debug_by_name()
* Eliminate RAII_VAR()
* Short circuit application name lookup if global debug enabled.

Change-Id: I5f78b7bd6ca7fd2c3b07cbbe036c6a93b4681123
2017-11-06 12:50:23 -05:00
Richard Mudgett
ee08f10d06 Fix ast_(v)asprintf() malloc failure usage conditions.
When (v)asprintf() fails, the state of the allocated buffer is undefined.
The library had better not leave an allocated buffer as a result or no one
will know to free it.  The most likely way it can return failure is for an
allocation failure.  If the printf conversion fails then you actually have
a threading problem which is much worse because another thread modified
the parameter values.

* Made __ast_asprintf()/__ast_vasprintf() set the returned buffer to NULL
on failure.  That is much more useful than either an uninitialized pointer
or a pointer that has already been freed.  Many uses won't have to check
for failure to ensure that the buffer won't be double freed or prevent an
attempt to free an uninitialized pointer.

* stasis.c: Fixed memory leak in multi_object_blob_to_ami() allocated by
ast_asprintf().

* ari/resource_bridges.c:ari_bridges_play_helper(): Remove assignment to
the wrong thing which is now not needed even if assigning to the right
thing.

Change-Id: Ib5252fb8850ecf0f78ed0ee2ca0796bda7e91c23
2017-11-06 12:47:30 -05:00
Joshua Colp
21d408a942 Merge "configure: Add autoconf check for libopusfile." 2017-11-06 10:38:18 -06:00
Joshua Colp
68b6ebd836 Merge "Prevent unload of modules which implement an Optional API." 2017-11-06 10:11:51 -06:00
Joshua Colp
ac7ec5026c Merge "Add missing menuselect dependencies." 2017-11-06 09:26:18 -06:00