authentic: Use memmove as the memory can overlap (if path is > 2B)
Thanks oss-fuzz https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23787
This commit is contained in:
parent
5098cfdb40
commit
05dcde508b
|
@ -567,7 +567,7 @@ authentic_set_current_files(struct sc_card *card, struct sc_path *path,
|
|||
sc_file_free(file);
|
||||
LOG_FUNC_RETURN(ctx, SC_ERROR_UNKNOWN_DATA_RECEIVED);
|
||||
}
|
||||
memcpy(card->cache.current_df->path.value + cur_df_path.len,
|
||||
memmove(card->cache.current_df->path.value + cur_df_path.len,
|
||||
card->cache.current_df->path.value,
|
||||
card->cache.current_df->path.len);
|
||||
memcpy(card->cache.current_df->path.value, cur_df_path.value, cur_df_path.len);
|
||||
|
|
Loading…
Reference in New Issue