Review at https://gerrit.osmocom.org/4717
reset: check length of the reset context name When allocating a reset context, the user must supply a human readable string name. At the moment the length of this name is not checked Check the length of the string name. This fixes CID 178664 Change-Id: I34511698923abec7545a6f3defd595f97b4bbeb1 --- M src/libcommon-cs/a_reset.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/17/4717/1 diff --git a/src/libcommon-cs/a_reset.c b/src/libcommon-cs/a_reset.c index f08d813..5216798 100644 --- a/src/libcommon-cs/a_reset.c +++ b/src/libcommon-cs/a_reset.c @@ -138,6 +138,9 @@ struct a_reset_ctx *reset; + if (strlen(name) >= sizeof(reset->name)) + return NULL; + /* Register the fsm description (if not already done) */ if (osmo_fsm_find_by_name(fsm.name) != &fsm) osmo_fsm_register(&fsm); -- To view, visit https://gerrit.osmocom.org/4717 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I34511698923abec7545a6f3defd595f97b4bbeb1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter <pma...@sysmocom.de>