dexter has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/43963?usp=email ) ( 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: sndcp_xid: use reasonable static buffer size ...................................................................... sndcp_xid: use reasonable static buffer size the output of gprs_sndcp_compile_xid is a buffer with TLV objects. Each TLV object is generated into an internal buffer (comp_bytes) before it is added to the output buffer using tlv_put. Since we are using a TLV structure here, the fields cannot exceed a length of 255. Using a buffer size of 512 is misleading. This patch has been ported from: osmo-sgsn.git If348e15a98fd6d28a1de08df57983bb710001d73 Related: OS#7095 Change-Id: Ic8e7719063d87e5328ebf503e9a43325bb07acf8 --- M src/sndcp/sndcp_xid.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve diff --git a/src/sndcp/sndcp_xid.c b/src/sndcp/sndcp_xid.c index 28e8928..a380206 100644 --- a/src/sndcp/sndcp_xid.c +++ b/src/sndcp/sndcp_xid.c @@ -560,7 +560,7 @@ { int rc; int byte_counter = 0; - uint8_t comp_bytes[512]; + uint8_t comp_bytes[256]; uint8_t xid_version_number[1]; OSMO_ASSERT(comp_fields); -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/43963?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Ic8e7719063d87e5328ebf503e9a43325bb07acf8 Gerrit-Change-Number: 43963 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier@sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de>