From 45c2184c7e02861b9089555dc72f11cd91bd6901 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 7 Jan 2011 11:36:54 +0100 Subject: mgcp: Return with NULL if we fail the size check. --- openbsc/src/mgcp/mgcp_protocol.c | 1 + 1 file changed, 1 insertion(+) (limited to 'openbsc') 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]; -- cgit v1.2.3