jolly submitted this change.

View Change


Approvals: fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified
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(-)

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.

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Ieff4ca886dec71aae1b6ecf2b623d600426580da
Gerrit-Change-Number: 33836
Gerrit-PatchSet: 2
Gerrit-Owner: jolly <andreas@eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: jolly <andreas@eversberg.eu>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>
Gerrit-MessageType: merged