Attention is currently required from: neels, daniel.
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/29121 )
Change subject: use_count: Return if uc is NULL
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/29121
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I792563696860a3100e95cafdd5fe57511819ef56
Gerrit-Change-Number: 29121
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 17 Aug 2022 14:34:39 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: fixeria.
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/28972 )
Change subject: Migrate to libosmocsn1 and libosmo-gprs-rlcmac
......................................................................
Patch Set 6: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/28972
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Icba62ad8649e78acab711392dfd74fe571474381
Gerrit-Change-Number: 28972
Gerrit-PatchSet: 6
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 17 Aug 2022 14:21:28 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
daniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/29121 )
Change subject: use_count: Return if uc is NULL
......................................................................
use_count: Return if uc is NULL
The documentation for osmo_use_count_get_put states the return value is
"Negative on range violations or USE_LIST == NULL, the use_cb()'s
return value, or 0 on success"
However, the code in _osmo_use_count_get_put doesn't check if uc is NULL
- instead it would crash in osmo_use_count_find() where it is dereferenced.
Add a check for uc and return -EINVAL if it is NULL.
Change-Id: I792563696860a3100e95cafdd5fe57511819ef56
Related: SYS#5895
---
M src/use_count.c
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/21/29121/1
diff --git a/src/use_count.c b/src/use_count.c
index 6c52899..9714403 100644
--- a/src/use_count.c
+++ b/src/use_count.c
@@ -235,6 +235,8 @@
{
struct osmo_use_count_entry *e;
int32_t old_use_count;
+ if (!uc)
+ return -EINVAL;
if (!change)
return 0;
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/29121
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I792563696860a3100e95cafdd5fe57511819ef56
Gerrit-Change-Number: 29121
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-MessageType: newchange