Change in osmo-mgw[master]: mgcp_client: do not crash when lco/sdp can not be generated

dexter gerrit-no-reply at lists.osmocom.org
Tue Jun 8 10:35:58 UTC 2021


dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/24182 )

Change subject: mgcp_client: do not crash when lco/sdp can not be generated
......................................................................


Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/c/osmo-mgw/+/24182/3/src/libosmo-mgcp-client/mgcp_client.c 
File src/libosmo-mgcp-client/mgcp_client.c:

https://gerrit.osmocom.org/c/osmo-mgw/+/24182/3/src/libosmo-mgcp-client/mgcp_client.c@1352 
PS3, Line 1352: rc_lco == -2
> Ack
Yes, it indicates a problem with the input data (aborted, msgb freed). msgb_printf() returns -EINVAL which is a different value and allows us to detect buffer size problems.

If we see a return code -2, we return NULL immediately, otherwise we add up all the return codes (msgb_printf returns 0 on success). If the final return code is different from zero, we know there were problems with the buffer size (too small)



-- 
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/24182
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ibb788343e0bec9c0eaf33e6e4727d4d36c100017
Gerrit-Change-Number: 24182
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Tue, 08 Jun 2021 10:35:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin at sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210608/c7c23152/attachment.htm>


More information about the gerrit-log mailing list