pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32308 )
Change subject: sndcp: Fix potential null ptr access if SNE not found ......................................................................
sndcp: Fix potential null ptr access if SNE not found
Change-Id: Ie04ec971680ea2aaa905539fafc936af8f14e9f5 --- M src/sndcp/sndcp.c 1 file changed, 10 insertions(+), 1 deletion(-)
Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved
diff --git a/src/sndcp/sndcp.c b/src/sndcp/sndcp.c index 1ff5893..ff38b1c 100644 --- a/src/sndcp/sndcp.c +++ b/src/sndcp/sndcp.c @@ -148,7 +148,7 @@ return NULL;
sne = gprs_sndcp_snme_get_sne(snme, nsapi); - if (sne->llc_sapi != llc_sapi) + if (!sne || sne->llc_sapi != llc_sapi) return NULL; return sne; }