diff options
author | Jaganath Kanakkassery <jaganath.k@samsung.com> | 2012-02-02 17:04:01 +0530 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-02-09 13:02:37 +0200 |
commit | 967fa58d55ce5b5ecc893d6e1681177732d695cd (patch) | |
tree | a09b4e72ea86c32940c75d6cc6ee66d9cf4f8116 /plugins/irmc.c | |
parent | 4fb58cc228eb9bc35f84ffd3f1e604ff42b85bb0 (diff) | |
download | obexd-967fa58d55ce5b5ecc893d6e1681177732d695cd.tar.gz |
irmc: Fix length parameter of strncpy
Diffstat (limited to 'plugins/irmc.c')
-rw-r--r-- | plugins/irmc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/irmc.c b/plugins/irmc.c index 6f28e51..8344a47 100644 --- a/plugins/irmc.c +++ b/plugins/irmc.c @@ -215,9 +215,9 @@ static void *irmc_connect(struct obex_session *os, int *err) * For now lets used hostname and some 'random' value */ gethostname(irmc->did, DID_LEN); - strncpy(irmc->sn, "12345", DID_LEN); - strncpy(irmc->manu, "obex", DID_LEN); - strncpy(irmc->model, "mymodel", DID_LEN); + strncpy(irmc->sn, "12345", sizeof(irmc->sn) - 1); + strncpy(irmc->manu, "obex", sizeof(irmc->manu) - 1); + strncpy(irmc->model, "mymodel", sizeof(irmc->model) - 1); /* We need to know the number of contact/cal/nt entries * somewhere so why not do it now. |