dexter submitted this change.
gprs_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.
Related: OS#7095
Change-Id: If348e15a98fd6d28a1de08df57983bb710001d73
---
M src/sgsn/gprs_sndcp_xid.c
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/sgsn/gprs_sndcp_xid.c b/src/sgsn/gprs_sndcp_xid.c
index 0b981b5..834d98a 100644
--- a/src/sgsn/gprs_sndcp_xid.c
+++ b/src/sgsn/gprs_sndcp_xid.c
@@ -566,7 +566,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 change 43957. To unsubscribe, or for help writing mail filters, visit settings.