Merge pull request #40 from lioncash/memset

extkeys: Correct memset zeroing in extkeys_initialize_keyset()
This commit is contained in:
SciresM 2018-08-11 18:53:40 -07:00 committed by GitHub
commit f9e37fb05c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -260,8 +260,7 @@ void extkeys_initialize_keyset(nca_keyset_t *keyset, FILE *f) {
pki_set_beta_nca0_exponent(exponent);
matched_key = 1;
} else {
char test_name[0x100];
memset(test_name, 0, sizeof(100));
char test_name[0x100] = {0};
for (unsigned int i = 0; i < 0x20 && !matched_key; i++) {
snprintf(test_name, sizeof(test_name), "keyblob_key_source_%02"PRIx32, i);
if (strcmp(key, test_name) == 0) {