diff options
authorOliver Smith <>2019-11-28 14:57:51 +0100
committerOliver Smith <>2019-11-28 15:11:33 +0100
commitb544ea396af5673b74a8829efda888698c389896 (patch)
parent632156a4a8146f5644ddbebf042e31bd0562b32f (diff)
mncc.c: fix gsm_mncc_rtp size checks
Verify is the parsed data is at least the size of the struct, not exactly the size. Make it accept messages with additional data, like the SDP information the TTCN-3 testsuite is sending since Ic9568c8927507e161aadfad1a4d20aa896d8ae30. This change makes the size checks consistent with the two other size checks in the file: if (rc < sizeof(*rtp)) { if (rc < sizeof(**mncc)) { Related: OS#4282 Change-Id: I522ce7f206932a816a64f03d916799c3215bb8c7
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mncc.c b/src/mncc.c
index f2e2579..16eed96 100644
--- a/src/mncc.c
+++ b/src/mncc.c
@@ -472,7 +472,7 @@ static void check_setup(struct mncc_connection *conn, const char *buf, int rc)
struct call *call;
struct mncc_call_leg *leg;
- if (rc != sizeof(*data)) {
+ if (rc < sizeof(*data)) {
LOGP(DMNCC, LOGL_ERROR, "gsm_mncc of wrong size %d vs. %zu\n",
rc, sizeof(*data));
return close_connection(conn);
@@ -548,7 +548,7 @@ static struct mncc_call_leg *find_leg(struct mncc_connection *conn,
struct mncc_call_leg *leg;
- if (rc != sizeof(**mncc)) {
+ if (rc < sizeof(**mncc)) {
LOGP(DMNCC, LOGL_ERROR, "gsm_mncc of wrong size %d vs. %zu\n",
rc, sizeof(**mncc));