[S] Change in osmo-mgw[master]: mgcp: correctly put NUL character in mgcp_msg_terminate_nul()
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35381?usp=email ) Change subject: mgcp: correctly put NUL character in mgcp_msg_terminate_nul() ...................................................................... mgcp: correctly put NUL character in mgcp_msg_terminate_nul() As was pointed out during code review of a previously merged patch, whenever we write something to the tailroom, we must use msgb_put(). Change-Id: Ibe1605631a94088bfd1f603f7043322ed5585ffe --- M include/osmocom/mgcp/mgcp_common.h 1 file changed, 13 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/81/35381/1 diff --git a/include/osmocom/mgcp/mgcp_common.h b/include/osmocom/mgcp/mgcp_common.h index be5a0d6..05ae95f 100644 --- a/include/osmocom/mgcp/mgcp_common.h +++ b/include/osmocom/mgcp/mgcp_common.h @@ -72,7 +72,7 @@ if (tail[-1] == '\0') /* nothing to do */; else if (msgb_tailroom(msg) > 0) - tail[0] = '\0'; + msgb_put_u8(msg, (uint8_t)'\0'); else if (tail[-1] == '\r' || tail[-1] == '\n') tail[-1] = '\0'; else { -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35381?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Ibe1605631a94088bfd1f603f7043322ed5585ffe Gerrit-Change-Number: 35381 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> Gerrit-MessageType: newchange
participants (1)
-
fixeria