[Asterisk-code-review] Iostreams: Correct off-by-one error. (asterisk[master])

Richard Mudgett asteriskteam at digium.com
Tue Dec 6 11:23:32 CST 2016


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/4556 )

Change subject: Iostreams: Correct off-by-one error.
......................................................................


Patch Set 1: Code-Review-1

(3 comments)

https://gerrit.asterisk.org/#/c/4556/1/main/iostream.c
File main/iostream.c:

Line 407: 	char sbuf[256], *buf = sbuf;
Should probably double the size of the buffer or make it 1024.  HTTP tends to be verbose.


Line 415: 	if (len > sizeof(sbuf)) {
This test is also off by one for the same reason.


Line 426: 		if (len2 > len) {
Should be if len2 != len.  How len is used by the call to ast_iostream_write() below requires it.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib3c5f41e96833d0415cf000656ac368168add639
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list