Change in libosmocore[master]: conv: prevent theoretical NULL pointer dereference in osmo_conv_encode()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

fixeria gerrit-no-reply at lists.osmocom.org
Sat Feb 8 21:14:09 UTC 2020


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/17108 )


Change subject: conv: prevent theoretical NULL pointer dereference in osmo_conv_encode()
......................................................................

conv: prevent theoretical NULL pointer dereference in osmo_conv_encode()

A caller shall never pass NULL to osmo_conv_encode().

Change-Id: Ice0050cd7c7e3fcbf57c2c73682ca28843a92d8b
Fixes: CID#208174
---
M src/conv.c
1 file changed, 1 insertion(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/08/17108/1

diff --git a/src/conv.c b/src/conv.c
index a2c13de..9b8df73 100644
--- a/src/conv.c
+++ b/src/conv.c
@@ -87,6 +87,7 @@
                       const struct osmo_conv_code *code)
 {
 	memset(encoder, 0x00, sizeof(struct osmo_conv_encoder));
+	OSMO_ASSERT(code != NULL);
 	encoder->code = code;
 }
 

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17108
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ice0050cd7c7e3fcbf57c2c73682ca28843a92d8b
Gerrit-Change-Number: 17108
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200208/14becf15/attachment.htm>


More information about the gerrit-log mailing list