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 <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: neels <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-Comment-Date: Tue, 08 Jun 2021 10:35:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <[email protected]>
Comment-In-Reply-To: fixeria <[email protected]>
Gerrit-MessageType: comment

Reply via email to