[Asterisk-code-review] res_pjsip: Replace invalid UTF-8 sequences in callerid name (asterisk[18])
Sean Bright
asteriskteam at digium.com
Wed Mar 1 08:36:16 CST 2023
Attention is currently required from: Joshua Colp, George Joseph.
Sean Bright has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/19898 )
Change subject: res_pjsip: Replace invalid UTF-8 sequences in callerid name
......................................................................
Patch Set 10: Code-Review-1
(5 comments)
File include/asterisk/utf8.h:
https://gerrit.asterisk.org/c/asterisk/+/19898/comment/e128a9a9_0456f775
PS10, Line 125: AST_UTF8_FAIL,
This is never used anywhere.
File main/utf8.c:
https://gerrit.asterisk.org/c/asterisk/+/19898/comment/3e79b1ed_5dad66dc
PS10, Line 115: if (!src) {
This change seems unrelated to the main purpose of this review. I also think we should leave it up to the caller not to pass in NULL. So if you want to keep this change I would prefer an ast_assert().
https://gerrit.asterisk.org/c/asterisk/+/19898/comment/fbb7716f_c5d4553f
PS10, Line 130: if (!src) {
This change seems unrelated to the main purpose of this review. I also think we should leave it up to the caller not to pass in NULL. So if you want to keep this change I would prefer an ast_assert().
https://gerrit.asterisk.org/c/asterisk/+/19898/comment/551d09b7_caa6f76f
PS10, Line 186: char *repl = "\xef\xbf\xbd";
: size_t repl_len = strlen(repl);
These could be const static. no? I think hardcoding `3` (or using `sizeof` if you want to be fancier) would be fine.
https://gerrit.asterisk.org/c/asterisk/+/19898/comment/7fc9c9f7_a26f46e4
PS10, Line 910:
This blank line bothers me
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/19898
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: I4ffbdb19c80bf0efc675d40078a3ca4f85c567d8
Gerrit-Change-Number: 19898
Gerrit-PatchSet: 10
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Sean Bright <sean at seanbright.com>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: George Joseph <gjoseph at digium.com>
Gerrit-Comment-Date: Wed, 01 Mar 2023 14:36:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20230301/0362e3c0/attachment-0001.html>
More information about the asterisk-code-review
mailing list