mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-04 08:29:44 -04:00
memcpy(x, NULL, 0) is undefined behavior
This commit is contained in:
parent
3d8ff446ad
commit
b35c418558
7 changed files with 31 additions and 13 deletions
|
@ -34,8 +34,9 @@ void calculate_mgf1_and_xor(void *masked, size_t masked_size, const void *seed,
|
|||
}
|
||||
|
||||
size_t hash_buf_size = seed_size + 4;
|
||||
memcpy(hash_buf, seed, seed_size);
|
||||
|
||||
if (seed_size != 0) {
|
||||
memcpy(hash_buf, seed, seed_size);
|
||||
}
|
||||
uint32_t round_num = 0;
|
||||
|
||||
uint8_t *p_out = (uint8_t *)masked;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue