asterisk/main
George Joseph 1ddfb7551a res_pjsip: Replace invalid UTF-8 sequences in callerid name
* Added a new function ast_utf8_replace_invalid_chars() to
  utf8.c that copies a string replacing any invalid UTF-8
  sequences with the Unicode specified U+FFFD replacement
  character.  For example:  "abc\xffdef" becomes "abc\uFFFDdef".
  Any UTF-8 compliant implementation will show that character
  as a � character.

* Updated res_pjsip:set_id_from_hdr() to use
  ast_utf8_replace_invalid_chars and print a warning if any
  invalid sequences were found during the copy.

* Updated stasis_channels:ast_channel_publish_varset to use
  ast_utf8_replace_invalid_chars and print a warning if any
  invalid sequences were found during the copy.

ASTERISK-27830

Change-Id: I4ffbdb19c80bf0efc675d40078a3ca4f85c567d8
2023-03-02 08:21:37 -06:00
..
stdtime main: Spelling fixes 2021-11-15 15:28:45 -06:00
.gitignore build-system: Allow building with static pjproject 2016-03-01 09:30:43 -07:00
Makefile test: Add ability to capture child process output 2022-09-12 08:15:51 -05:00
abstract_jb.c main: Spelling fixes 2021-11-15 15:28:45 -06:00
acl.c acl.c: Coerce a NULL pointer into the empty string 2020-07-20 11:37:48 -05:00
adsi.c Allow Asterisk to compile under GCC 4.10 2014-05-09 22:49:26 +00:00
alaw.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
alertpipe.c utils: Wrap socket() and pipe() to reduce syscalls 2018-12-07 09:06:08 -05:00
aoc.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
app.c app_sf: Add full tech-agnostic SF support 2022-01-05 09:34:49 -06:00
ast_expr2.c Remove #include <sys/cdefs.h> 2020-05-05 10:06:43 -05:00
ast_expr2.fl Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
ast_expr2.h Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
ast_expr2.y Remove #include <sys/cdefs.h> 2020-05-05 10:06:43 -05:00
ast_expr2f.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
asterisk.c cli: Prevent assertions on startup from bad ao2 refs. 2022-09-09 20:41:29 -05:00
asterisk.dynamics Fix error loading res_monitor. 2014-04-23 15:02:39 +00:00
asterisk.exports.in Scope Tracing: A new facility for tracing scope enter/exit 2020-06-02 11:35:07 -05:00
astfd.c main: Spelling fixes 2021-11-15 15:28:45 -06:00
astmm.c progdocs: Fix for Doxygen, the hidden parts. 2021-12-02 10:38:23 -06:00
astobj2.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
astobj2_container.c progdocs: Fix for Doxygen, the hidden parts. 2021-12-02 10:38:23 -06:00
astobj2_container_private.h main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
astobj2_global.c core: Fix ABI mismatch of ao2_global_obj. 2019-09-23 07:35:48 -04:00
astobj2_hash.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
astobj2_private.h Astobj2: Allow reference debugging to be enabled/disabled by config. 2015-04-27 18:37:26 -04:00
astobj2_rbtree.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
audiohook.c audiohook: add directional awareness 2022-10-11 08:13:22 -05:00
autochan.c autochan/mixmonitor/chanspy: Fix unsafe channel locking and references. 2017-03-15 17:18:55 -06:00
autoservice.c autoservice: Don't start channel autoservice if the thread is a user interface. 2018-06-19 15:02:52 -05:00
backtrace.c main/backtrace: binutils-2.34 fix. 2020-04-06 10:23:20 -05:00
bridge.c general: Fix various typos. 2022-07-12 07:45:19 -05:00
bridge_after.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
bridge_basic.c doxygen: Fix doxygen errors. 2023-01-30 16:17:20 -05:00
bridge_channel.c pbx: Add helper function to execute applications. 2022-06-27 10:42:29 -05:00
bridge_roles.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
bucket.c main: Spelling fixes 2021-11-15 15:28:45 -06:00
buildinfo.c fix a few small things found by using sparse 2008-10-30 16:49:02 +00:00
callerid.c chan_dahdi: Fix buggy and missing Caller ID parameters 2022-07-14 08:18:51 -05:00
ccss.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
cdr.c cdr: Allow bridging and dial state changes to be ignored. 2022-10-10 11:33:07 -05:00
cel.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
channel.c core & res_pjsip: Improve topology change handling. 2022-11-29 16:35:37 -06:00
channel_internal_api.c general: Very minor coding guideline fixes. 2022-08-17 11:04:55 -05:00
chanvars.c core: Remove ABI effects of MALLOC_DEBUG. 2018-03-01 13:13:55 -06:00
cli.c cli: Prevent assertions on startup from bad ao2 refs. 2022-09-09 20:41:29 -05:00
codec.c astobj2: Eliminate legacy container allocation macros. 2018-10-19 17:33:05 -04:00
codec_builtin.c codec_builtin.c: G729 audio gets corrupted by Asterisk due to smoother 2021-08-03 07:15:10 -05:00
config.c res_geolocation: Fix segfault when there's an empty element 2022-09-13 09:50:38 -05:00
config_options.c xmldoc: Allow XML docs to be reloaded. 2022-12-08 09:11:44 -06:00
conversions.c conversions.c: Specify that we only want to parse decimal numbers. 2022-03-23 17:04:44 -05:00
core_local.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
core_unreal.c core_unreal: Flip stream direction of second channel. 2022-05-05 08:15:50 -05:00
crypt.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
cygload.c Kill off red blobs in most of main/* 2012-03-22 19:51:16 +00:00
data_buffer.c res_rtp_asterisk: Free payload when error on insertion to data buffer 2020-04-15 13:56:40 -05:00
datastore.c Geolocation: Base Asterisk Prereqs 2022-07-07 08:22:43 -05:00
db.c db: Fix incorrect DB tree count for AMI. 2022-09-26 14:12:25 -05:00
devicestate.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
dial.c Dialing API: Cancel a running async thread, may not cancel all calls 2022-10-27 07:51:49 -05:00
dns.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
dns_core.c dns_txt: Add TXT record parsing support 2020-03-13 09:58:59 -05:00
dns_naptr.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
dns_query_set.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
dns_recurring.c progdocs: Fix for Doxygen, the hidden parts. 2021-12-02 10:38:23 -06:00
dns_srv.c Compiler fixes for gcc 10 2020-06-10 09:33:28 -05:00
dns_system_resolver.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
dns_test.c progdocs: Fix for Doxygen, the hidden parts. 2021-12-02 10:38:23 -06:00
dns_tlsa.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
dns_txt.c core/dns: Add system include required on FreeBSD 2020-04-28 13:05:55 -05:00
dnsmgr.c main: Spelling fixes 2021-11-15 15:28:45 -06:00
dsp.c dsp: Add define macro for DTMF_MATRIX_SIZE 2022-01-05 12:24:25 -06:00
ecdisa.h Kill off red blobs in most of main/* 2012-03-22 19:51:16 +00:00
endpoints.c stasis: Improve topic/subscription names and statistics. 2019-03-11 11:39:35 -03:00
enum.c main: Spelling fixes 2021-11-15 15:28:45 -06:00
event.c various files - fix some alerts raised by lgtm code analysis 2019-11-18 08:30:45 -06:00
features.c features: Add no answer option to Bridge. 2022-09-26 11:27:35 -05:00
features_config.c features: Add transfer initiation options. 2022-09-08 12:44:35 -05:00
features_config.h loader: Convert reload_classes to built-in modules. 2018-03-14 05:20:12 -04:00
file.c streams: Ensure that stream is closed in ast_stream_and_wait on error 2022-12-20 08:51:45 -06:00
fixedjitterbuf.c jitterbuffer: Correct signed/unsigned mismatch causing assert 2021-06-24 08:21:35 -05:00
fixedjitterbuf.h abstract/fixed/adpative jitter buffer: disallow frame re-inserts 2017-01-17 17:08:53 -06:00
format.c astobj2: Eliminate legacy container allocation macros. 2018-10-19 17:33:05 -04:00
format_cache.c format_cap: Perform codec lookups by pointer instead of name 2020-09-15 14:37:21 -05:00
format_cap.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
format_compatibility.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
frame.c main/frame: Add missing control frame names to ast_frame_subclass2str 2021-01-27 10:04:32 -06:00
framehook.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
fskmodem.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
fskmodem_float.c main: Spelling fixes 2021-11-15 15:28:45 -06:00
fskmodem_int.c main: Spelling fixes 2021-11-15 15:28:45 -06:00
global_datastores.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
hashtab.c core: Remove ABI effects of MALLOC_DEBUG. 2018-03-01 13:13:55 -06:00
heap.c core: Remove ABI effects of MALLOC_DEBUG. 2018-03-01 13:13:55 -06:00
http.c http.c: Fix NULL pointer dereference bug 2023-01-04 11:56:21 -06:00
image.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
indications.c Compiler fixes for GCC when printf %s is NULL 2020-11-03 15:32:33 -06:00
io.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
iostream.c websocket: Consider pending SSL data when waiting for socket input 2020-01-02 15:51:37 -06:00
jitterbuf.c Fix Common Typo's. 2017-12-20 12:40:01 -05:00
json.c strings/json: Add string delimter match, and object create with vars methods 2021-10-28 08:58:44 -05:00
libasteriskpj.c PJPROJECT logging: Fix detection of max supported log level. 2017-01-24 11:25:19 -06:00
libasteriskssl.c libasteriskssl: Allow OpenSSL 1.0.2 configured with no-deprecated. 2018-05-20 13:55:26 +02:00
libasteriskssl.exports.in Address OpenSSL initialization issues when using third-party libraries. 2012-01-30 21:21:16 +00:00
loader.c loader: Allow declined modules to be unloaded. 2023-01-05 06:13:18 -06:00
lock.c lock.c: Add AMI event for deadlocks. 2022-09-11 18:02:09 -05:00
logger.c logger: workaround woefully small BUFSIZ in MUSL 2022-03-23 18:10:44 -05:00
logger_category.c Logging: Add debug logging categories 2020-10-12 10:50:26 -05:00
manager.c manager: Fix appending variables. 2023-01-03 12:02:36 -06:00
manager_bridges.c documentation: Add missing AMI documentation 2022-01-05 10:55:13 -06:00
manager_channels.c ami: Add AMI event for Wink 2022-01-05 11:39:48 -06:00
manager_endpoints.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
manager_mwi.c documentation: Add missing AMI documentation 2022-01-05 10:55:13 -06:00
manager_system.c Remove constant conditionals (dead-code). 2017-12-19 09:42:19 -05:00
max_forwards.c Detect potential forwarding loops based on count. 2015-04-17 15:58:07 -05:00
md5.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
media_cache.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
media_index.c media_index.c: Refactored so it doesn't cache the index 2019-01-28 12:26:58 -07:00
message.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
mixmonitor.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
mwi.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
named_acl.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
named_locks.c core: Use macros to generate ao2_container callbacks where possible. 2017-12-30 13:20:16 -05:00
netsock2.c netsock2: Add ast_sockaddr_resolve_first_af to netsock2 public API 2018-05-21 11:03:10 -05:00
optional_api.c progdocs: Fix for Doxygen, the hidden parts. 2021-12-02 10:38:23 -06:00
options.c manager: prevent file access outside of config dir 2022-12-03 10:23:04 -06:00
parking.c stasis: Improve topic/subscription names and statistics. 2019-03-11 11:39:35 -03:00
pbx.c pbx.c: Simplify ast_context memory management. 2022-07-13 17:17:59 -05:00
pbx_app.c pbx_app: Update outdated pbx_exec channel snapshots. 2023-01-03 07:55:45 -06:00
pbx_builtins.c pbx_builtins: Allow Answer to return immediately. 2022-11-29 09:29:57 -06:00
pbx_functions.c pbx_functions.c: Manually update ast_str strlen. 2022-07-26 10:48:10 -05:00
pbx_hangup_handler.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
pbx_ignorepat.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
pbx_include.c aelparse: Accept an included context with timings. 2021-08-06 09:19:38 -05:00
pbx_private.h pbx: Create pbx_sw.c for management of 'struct ast_sw'. 2016-07-21 13:58:26 -04:00
pbx_sw.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
pbx_switch.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
pbx_timing.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
pbx_variables.c pbx_functions.c: Manually update ast_str strlen. 2022-07-26 10:48:10 -05:00
pickup.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
plc.c loader: Process dependencies for built-in modules. 2018-07-26 14:29:18 -05:00
poll.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
presencestate.c stasis: Improve topic/subscription names and statistics. 2019-03-11 11:39:35 -03:00
privacy.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
rtp_engine.c res_rtp_asterisk: Asterisk Media Experience Score (MES) 2023-01-09 10:37:56 -07:00
say.c say: Don't prepend ampersand erroneously. 2022-10-26 10:07:24 -05:00
sched.c sched: fix and test a double deref on delete of an executing call back 2022-01-21 10:05:48 -06:00
sdp_srtp.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
security_events.c stasis: Improve topic/subscription names and statistics. 2019-03-11 11:39:35 -03:00
sem.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
serializer.c serializer: set high/low alert levels on whole pool 2019-11-18 11:05:24 -05:00
sha1.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
sip_api.c Don't make chan_sip export global symbols. 2012-10-11 15:49:02 +00:00
slinfactory.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
smoother.c main: Spelling fixes 2021-11-15 15:28:45 -06:00
sorcery.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
sounds.c sounds: Sort 'core show sounds' output 2019-02-04 14:40:35 -06:00
srv.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
stasis.c general: Improve logging levels of some log messages. 2022-08-01 11:03:34 -05:00
stasis_bridges.c stasis: Fix for Doxygen. 2021-11-18 13:25:54 -06:00
stasis_cache.c stasis: Fix for Doxygen. 2021-11-18 13:25:54 -06:00
stasis_cache_pattern.c stasis: Improve topic/subscription names and statistics. 2019-03-11 11:39:35 -03:00
stasis_channels.c res_pjsip: Replace invalid UTF-8 sequences in callerid name 2023-03-02 08:21:37 -06:00
stasis_endpoints.c progdocs: Fix Doxygen left-overs. 2021-12-13 09:00:04 -06:00
stasis_message.c stasis: Allow filtering by formatter 2018-12-07 08:59:00 -05:00
stasis_message_router.c progdocs: Fix for Doxygen, the hidden parts. 2021-12-02 10:38:23 -06:00
stasis_state.c GCC12: Fixes for 18+. state_id_by_topic comparing wrong value 2022-05-09 07:48:40 -05:00
stasis_system.c stasis: Improve topic/subscription names and statistics. 2019-03-11 11:39:35 -03:00
strcompat.c app.c: make sure that no non-async-signal-safe syscalls are used after 2020-05-08 13:44:08 -05:00
stream.c res_pjsip_session: Handle multi-stream re-invites better 2020-09-11 10:41:15 -06:00
stringfields.c stringfields: Remove MALLOC_DEBUG fields from struct ast_string_field_mgr. 2018-03-13 16:24:06 -04:00
strings.c general: Very minor coding guideline fixes. 2022-08-17 11:04:55 -05:00
stun.c GCC12: Fixes for 16+ 2022-05-09 08:21:58 -05:00
syslog.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
taskprocessor.c taskprocessor.c: Prevent crash on graceful shutdown 2022-02-14 16:18:40 -06:00
tcptls.c tcptls: Prevent crash when freeing OpenSSL errors. 2022-10-31 07:55:00 -05:00
tdd.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
term.c term.c: Add support for extended number format terminfo files. 2021-09-09 06:48:40 -05:00
test.c test.c: Avoid passing -1 to FD_* family of functions. 2023-02-28 12:24:43 -06:00
threadpool.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
threadstorage.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
time.c time: add support for time64 libcs 2022-03-24 12:01:32 -05:00
timing.c loader: Create ast_module_running_ref. 2018-01-03 17:23:36 -05:00
translate.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
udptl.c main: Spelling fixes 2021-11-15 15:28:45 -06:00
ulaw.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
uri.c uri: Quiet warning about type qualifiers ignored on function return type 2014-08-21 14:42:12 +00:00
utf8.c res_pjsip: Replace invalid UTF-8 sequences in callerid name 2023-03-02 08:21:37 -06:00
utils.c res_geolocation: Fix segfault when there's an empty element 2022-09-13 09:50:38 -05:00
uuid.c main: Fix for Doxygen. 2021-12-02 15:02:42 -06:00
xml.c res_geolocation: Address user issues, remove complexity, plug leaks 2022-08-10 12:49:19 -05:00
xmldoc.c xmldoc: Allow XML docs to be reloaded. 2022-12-08 09:11:44 -06:00