dexter has uploaded this change for review.

View Change

pcu_sock: add some guard space to message buffer

in osmo-pcu, the message buffer in pcu_sock_read is allocated with 1000
bytes in addition to the true size of the pcu_prim struct. Presumably
this is to avoid compatibility problems in case the primitives slightly
grow due to appending new struct members. Lets do the same in osmo-bts.

Change-Id: I5b2a09329ff4c249aceefe1b5d0f9d0236b98bb0
Related OS#5198

Change-Id: I99f5204b0563f72f9da427bb7aa5451552d8c5b5
---
M src/osmo-bsc/pcu_sock.c
1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/62/29362/1
diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c
index 25bfc89..7978d2e 100644
--- a/src/osmo-bsc/pcu_sock.c
+++ b/src/osmo-bsc/pcu_sock.c
@@ -566,7 +566,7 @@
struct msgb *msg;
int rc;

- msg = msgb_alloc(sizeof(*pcu_prim), "pcu_sock_rx");
+ msg = msgb_alloc(sizeof(*pcu_prim) + 1000, "pcu_sock_rx");
if (!msg)
return -ENOMEM;


To view, visit change 29362. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I99f5204b0563f72f9da427bb7aa5451552d8c5b5
Gerrit-Change-Number: 29362
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier@sysmocom.de>
Gerrit-MessageType: newchange