mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
libmsc/db: Fix max value of ainfo->a3a8_ki_len in db_get_authinfo_for_subscr
Thanks to Robert Ingr for pointing this out Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
@@ -369,7 +369,7 @@ int db_get_authinfo_for_subscr(struct gsm_auth_info *ainfo,
|
||||
ainfo->a3a8_ki_len = dbi_result_get_field_length(result, "a3a8_ki");
|
||||
a3a8_ki = dbi_result_get_binary(result, "a3a8_ki");
|
||||
if (ainfo->a3a8_ki_len > sizeof(ainfo->a3a8_ki))
|
||||
ainfo->a3a8_ki_len = sizeof(ainfo->a3a8_ki_len);
|
||||
ainfo->a3a8_ki_len = sizeof(ainfo->a3a8_ki);
|
||||
memcpy(ainfo->a3a8_ki, a3a8_ki, ainfo->a3a8_ki_len);
|
||||
|
||||
dbi_result_free(result);
|
||||
|
Reference in New Issue
Block a user