summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/osmo-sim-test.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/osmo-sim-test.c b/utils/osmo-sim-test.c
index ea241206..5588294a 100644
--- a/utils/osmo-sim-test.c
+++ b/utils/osmo-sim-test.c
@@ -74,7 +74,8 @@ static int verify_pin(struct osim_chan_hdl *st, uint8_t pin_nr, char *pin)
msg = osim_new_apdumsg(0x00, 0x20, 0x00, pin_nr, 8, 0);
pindst = (char *) msgb_put(msg, 8);
memset(pindst, 0xFF, 8);
- strncpy(pindst, pin, strlen(pin));
+ /* Do not copy the terminating \0 */
+ memcpy(pindst, pin, strlen(pin));
return osim_transceive_apdu(st, msg);
}