cosmetic: auth tuple memcpy: rather use target's sizeof()

This commit is contained in:
Neels Hofmeyr
2016-04-13 19:14:47 +02:00
parent afce55a4bc
commit 9f2eaf8f56
2 changed files with 6 additions and 6 deletions

View File

@@ -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 */

View File

@@ -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;
}