summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp <pmaier@sysmocom.de>2016-11-15 19:37:05 +0100
committerHarald Welte <laforge@gnumonks.org>2016-11-15 22:32:20 +0000
commit7d3093506ad9621caf2a5af11602ec081ab76480 (patch)
treee76e9dccbe1224f41d84d54af7084aff0d014e9c
parentbb42eee11310eb03526138d38a8af7d705500253 (diff)
SNDCP: Fixup based on Coverity Scan suggestion
This commit fixes Coverity Scan defect: CID 151900: Null pointer dereferences (FORWARD_NULL) Passing null pointer "comp_field->v42bis_params->nsapi" to "memcpy", which dereferences it. Change-Id: Iff83e21168a267dd4b4c401ab7c603e029b3ac39
-rw-r--r--openbsc/src/gprs/gprs_sndcp_comp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/gprs/gprs_sndcp_comp.c b/openbsc/src/gprs/gprs_sndcp_comp.c
index cae0039a3..1591f803c 100644
--- a/openbsc/src/gprs/gprs_sndcp_comp.c
+++ b/openbsc/src/gprs/gprs_sndcp_comp.c
@@ -72,7 +72,7 @@ static struct gprs_sndcp_comp *gprs_sndcp_comp_create(const void *ctx,
} else if (comp_field->v44_params) {
comp_entity->nsapi_len = comp_field->v44_params->nsapi_len;
memcpy(comp_entity->nsapi,
- comp_field->v42bis_params->nsapi,
+ comp_field->v44_params->nsapi,
sizeof(comp_entity->nsapi));
} else {
/* The caller is expected to check carefully if the all