[Asterisk-code-review] /res pjsip refer.c: Fix seg fault in process of Refer-to hea... (asterisk[master])

Richard Mudgett asteriskteam at digium.com
Fri Mar 4 11:03:46 CST 2016


Richard Mudgett has posted comments on this change.

Change subject: /res_pjsip_refer.c: Fix seg fault in process of Refer-to header.
......................................................................


Patch Set 1: Code-Review-1

(3 comments)

Patch looks OK other than the minor findings that are easily fixed.

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

Line 7: /res_pjsip_refer.c: Fix seg fault in process of Refer-to header.
Remove the leading /


Line 9:     In an incoming Refer request when the "Refer-to" header is parsed and
      :     extarcted the uri, that uri is parsed by "pjsip_parse_uri" fuction, the
      :     second parameter of that function is the uri NULL terminated but the uri
      :     may not come NULL terminated so before this fix the NULL terminator was
      :     putted in a section of memory where it shouldn't be, so it can produce
      :     a segmentation fault or a write of a 0 byte in a section of memory that
      :     it shouldn't write modifiying another variable. Now the uri is NULL
      :     terminated safely coping the uri to a new chunk of memory with the
      :     correct size to be NULL terminated.
      : 
      :     ASTERISK-25814 #close
This paragraph has several spelling/typo errors.

These lines should not be indented.


https://gerrit.asterisk.org/#/c/2348/1/res/res_pjsip_refer.c
File res/res_pjsip_refer.c:

Line 981: 	size_t uri_size = 0;
Initialization is unnecessary here since the first time this variable is used it is assigned a value.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I32565496684a5a49c3278fce06474b8c94b37342
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Sergio Medina Toledo <lumasepa at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Sergio Medina Toledo <lumasepa at gmail.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list