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
This commit is contained in:
Andreas Eversberg 2023-07-19 16:14:25 +02:00 committed by jolly
parent 171ba46382
commit 845ad38328
1 changed files with 2 additions and 1 deletions

View File

@ -819,7 +819,8 @@ DEFUN(cfg_ms_imei, cfg_ms_imei_cmd, "imei IMEI [SV]",
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;
}