mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-02 13:03:33 +00:00
cosmetic: auth tuple memcpy: rather use target's sizeof()
This commit is contained in:
@@ -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;
|
ctx->auth_triplet.key_seq = 0;
|
||||||
memcpy(&ctx->auth_triplet.rand, &tmp_rand, sizeof(tmp_rand));
|
memcpy(&ctx->auth_triplet.rand, &tmp_rand, sizeof(ctx->auth_triplet.rand));
|
||||||
memcpy(&ctx->auth_triplet.sres, &vec.sres, sizeof(vec.sres));
|
memcpy(&ctx->auth_triplet.sres, &vec.sres, sizeof(ctx->auth_triplet.sres));
|
||||||
memcpy(&ctx->auth_triplet.kc, &vec.kc, sizeof(vec.kc));
|
memcpy(&ctx->auth_triplet.kc, &vec.kc, sizeof(ctx->auth_triplet.kc));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update MM Context with other data */
|
/* Update MM Context with other data */
|
||||||
|
|||||||
@@ -165,9 +165,9 @@ int iu_hack__get_hardcoded_auth_tuple(struct gsm_auth_tuple *atuple)
|
|||||||
osmo_auth_gen_vec(&vec, &auth, tmp_rand);
|
osmo_auth_gen_vec(&vec, &auth, tmp_rand);
|
||||||
|
|
||||||
atuple->key_seq = 0;
|
atuple->key_seq = 0;
|
||||||
memcpy(&atuple->rand, &tmp_rand, sizeof(tmp_rand));
|
memcpy(&atuple->rand, &tmp_rand, sizeof(atuple->rand));
|
||||||
memcpy(&atuple->sres, &vec.sres, sizeof(vec.sres));
|
memcpy(&atuple->sres, &vec.sres, sizeof(atuple->sres));
|
||||||
memcpy(&atuple->kc, &vec.kc, sizeof(vec.kc));
|
memcpy(&atuple->kc, &vec.kc, sizeof(atuple->kc));
|
||||||
return AUTH_DO_AUTH;
|
return AUTH_DO_AUTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user