aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/mgcp
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-01-07 11:36:54 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-01-07 11:36:54 +0100
commit45c2184c7e02861b9089555dc72f11cd91bd6901 (patch)
treed4bff3d2ca7e120e681a764799ea087fd79e47b5 /openbsc/src/mgcp
parentf43f2fce82fd115c88b6e50837b41f480e9b384e (diff)
mgcp: Return with NULL if we fail the size check.
Diffstat (limited to 'openbsc/src/mgcp')
-rw-r--r--openbsc/src/mgcp/mgcp_protocol.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/openbsc/src/mgcp/mgcp_protocol.c b/openbsc/src/mgcp/mgcp_protocol.c
index 32f467b5a..7d1265936 100644
--- a/openbsc/src/mgcp/mgcp_protocol.c
+++ b/openbsc/src/mgcp/mgcp_protocol.c
@@ -290,6 +290,7 @@ static struct mgcp_endpoint *find_e1_endpoint(struct mgcp_config *cfg,
mgcp_endp = mgcp_timeslot_to_endpoint(trunk - 1, endp);
if (mgcp_endp < 1 || mgcp_endp >= cfg->number_endpoints) {
LOGP(DMGCP, LOGL_ERROR, "Failed to find endpoint '%s'\n", mgcp);
+ return NULL;
}
return &cfg->endpoints[mgcp_endp];