[Asterisk-code-review] Subscription body text string to 512 (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Mon Mar 13 16:36:06 CDT 2017


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

Change subject: Subscription body text string to 512
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

https://gerrit.asterisk.org/#/c/5171/1//COMMIT_MSG
Commit Message:

Line 7: Subscription body text string to 512
Please read the guidelines on a commit message [1].

This message only indicates what you did it does not give a clue why you did it.  You also need to include the ASTERISK issue in the message:  ASTERISK-26776.

[1] https://wiki.asterisk.org/wiki/display/AST/Commit+Messages


https://gerrit.asterisk.org/#/c/5171/1/res/res_pjsip_pubsub.c
File res/res_pjsip_pubsub.c:

Line 1146: 	sub->body_text = ast_str_create(512);
Since the ast_str is created as a dynamic string, this only changes the initial buffer allocation.

You say that increasing this prevents the crash then the problem is not really here but in the ast_str code to increase the size of the buffer (ast_str_make_space()) or the code calculating how much to increase the buffer size by.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I884b6f4e8233a355d0be687ec78d41bc0e4d3fd2
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Joshua Elson <joshelson at gmail.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