[Asterisk-code-review] func iconv: Ensure output strings are properly terminated. (asterisk[13])

Badalian Vyacheslav asteriskteam at digium.com
Thu Feb 11 14:36:58 CST 2016


Badalian Vyacheslav has posted comments on this change.

Change subject: func_iconv: Ensure output strings are properly terminated.
......................................................................


Patch Set 1: Code-Review-1

All function just does not matter. Since it will always return buf [0] = '\0'.
It is necessary to terminate to end of buf 
-- *(buf + outcount) = '\0' 
with checks 
"outcount > 0" and "(buf + outcount) < sizeof(buf)"

-- 
To view, visit https://gerrit.asterisk.org/2239
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id75ad202300960a1e91afe15e319d992936ecc17
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Badalian Vyacheslav <v.badalyan at open-bs.ru>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-HasComments: No



More information about the asterisk-code-review mailing list