jolly has uploaded this change for review.
Fix VTY command to set IMEISV.
The pointer and size must given for the SV portion of the character
array only.
Fixes: CID#314049, CID#314048
Change-Id: Ieff4ca886dec71aae1b6ecf2b623d600426580da
---
M src/host/layer23/src/common/vty.c
1 file changed, 15 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/36/33836/1
diff --git a/src/host/layer23/src/common/vty.c b/src/host/layer23/src/common/vty.c
index 526db6f..dd80a14 100644
--- a/src/host/layer23/src/common/vty.c
+++ b/src/host/layer23/src/common/vty.c
@@ -819,7 +819,8 @@
OSMO_STRLCPY_ARRAY(set->imei, argv[0]);
OSMO_STRLCPY_ARRAY(set->imeisv, argv[0]);
- OSMO_STRLCPY_ARRAY(set->imeisv + 15, sv);
+ osmo_strlcpy(set->imeisv + GSM23003_IMEI_NUM_DIGITS, sv,
+ sizeof(set->imeisv) - GSM23003_IMEI_NUM_DIGITS);
return CMD_SUCCESS;
}
To view, visit change 33836. To unsubscribe, or for help writing mail filters, visit settings.