diff options
Diffstat (limited to 'src/libgsmd/libgsmd_pin.c')
-rw-r--r-- | src/libgsmd/libgsmd_pin.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libgsmd/libgsmd_pin.c b/src/libgsmd/libgsmd_pin.c index f99084a..204f655 100644 --- a/src/libgsmd/libgsmd_pin.c +++ b/src/libgsmd/libgsmd_pin.c @@ -75,7 +75,7 @@ int lgsm_pin(struct lgsm_handle *lh, unsigned int type, return -ENOMEM; gm->gp.type = type; - strcpy(gm->gp.pin, pin); + strncpy(gm->gp.pin, pin, sizeof(gm->gp.pin)); switch (type) { case GSMD_PIN_SIM_PUK: @@ -87,7 +87,7 @@ int lgsm_pin(struct lgsm_handle *lh, unsigned int type, free(gm); return -EINVAL; } - strcpy(gm->gp.newpin, newpin); + strncpy(gm->gp.newpin, newpin, sizeof(gm->gp.newpin)); break; default: break; |