[Asterisk-code-review] term: truncate the message rather than the escapes. (asterisk[master])

Sean Bright asteriskteam at digium.com
Fri Nov 5 09:13:44 CDT 2021


Attention is currently required from: Jaco Kroon.
Sean Bright has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/16640 )

Change subject: term: truncate the message rather than the escapes.
......................................................................


Patch Set 2: Code-Review-1

(1 comment)

Patchset:

PS2: 
I would prefer an optimistic approach. Write out the whole thing with snprintf(), check that the return value of snprintf is less than maxout. If not, go through all of the other stuff.

Additionally, term_end does not change throughout the life of the program, so if we need its length it should be cached when term_end is set.



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/16640
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I80ef7a4bfd2947e090ef830143391d11baebdb0d
Gerrit-Change-Number: 16640
Gerrit-PatchSet: 2
Gerrit-Owner: Jaco Kroon <jaco at uls.co.za>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Sean Bright <sean at seanbright.com>
Gerrit-Attention: Jaco Kroon <jaco at uls.co.za>
Gerrit-Comment-Date: Fri, 05 Nov 2021 14:13:44 +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/20211105/1ea04c5c/attachment.html>


More information about the asterisk-code-review mailing list