diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-04-13 19:14:47 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-04-20 11:23:00 +0200 |
commit | 9f2eaf8f56b14a462f0cd92843f11a17b8bfbc71 (patch) | |
tree | bec884ed8ee998600b455fea00d805dfb2bc55b9 /openbsc/src | |
parent | afce55a4bc6cd4ccdffece99ad37cc1b20b663e7 (diff) |
cosmetic: auth tuple memcpy: rather use target's sizeof()
Diffstat (limited to 'openbsc/src')
-rw-r--r-- | openbsc/src/gprs/gprs_gmm.c | 6 | ||||
-rw-r--r-- | openbsc/src/libmsc/gsm_04_08.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index aa376d848..51ce22b5b 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -1111,9 +1111,9 @@ static int gsm48_rx_gmm_att_req(struct sgsn_mm_ctx *ctx, struct msgb *msg, ctx->auth_triplet.key_seq = 0; - memcpy(&ctx->auth_triplet.rand, &tmp_rand, sizeof(tmp_rand)); - memcpy(&ctx->auth_triplet.sres, &vec.sres, sizeof(vec.sres)); - memcpy(&ctx->auth_triplet.kc, &vec.kc, sizeof(vec.kc)); + memcpy(&ctx->auth_triplet.rand, &tmp_rand, sizeof(ctx->auth_triplet.rand)); + memcpy(&ctx->auth_triplet.sres, &vec.sres, sizeof(ctx->auth_triplet.sres)); + memcpy(&ctx->auth_triplet.kc, &vec.kc, sizeof(ctx->auth_triplet.kc)); } /* Update MM Context with other data */ diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index be03fd7d5..4fb1e5d2f 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -165,9 +165,9 @@ int iu_hack__get_hardcoded_auth_tuple(struct gsm_auth_tuple *atuple) osmo_auth_gen_vec(&vec, &auth, tmp_rand); atuple->key_seq = 0; - memcpy(&atuple->rand, &tmp_rand, sizeof(tmp_rand)); - memcpy(&atuple->sres, &vec.sres, sizeof(vec.sres)); - memcpy(&atuple->kc, &vec.kc, sizeof(vec.kc)); + memcpy(&atuple->rand, &tmp_rand, sizeof(atuple->rand)); + memcpy(&atuple->sres, &vec.sres, sizeof(atuple->sres)); + memcpy(&atuple->kc, &vec.kc, sizeof(atuple->kc)); return AUTH_DO_AUTH; } |