diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2022-09-15 12:19:43 +0200 |
---|---|---|
committer | Philipp Maier <pmaier@sysmocom.de> | 2022-09-26 13:24:03 +0200 |
commit | 6e9f5e54d2f6d2db4c81857f7bc977b97b571346 (patch) | |
tree | 8f11543f9e130d82f2cc948d8784a822c79648ea /src/osmo-bsc/pcu_sock.c | |
parent | 797378af74e899eec6fd87102ca104bc7da3a722 (diff) |
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: I99f5204b0563f72f9da427bb7aa5451552d8c5b5
Related: OS#5198
Diffstat (limited to 'src/osmo-bsc/pcu_sock.c')
-rw-r--r-- | src/osmo-bsc/pcu_sock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c index 1af9a9db6..81198bd29 100644 --- a/src/osmo-bsc/pcu_sock.c +++ b/src/osmo-bsc/pcu_sock.c @@ -566,7 +566,7 @@ static int pcu_sock_read(struct osmo_fd *bfd) 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; |