mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 16:39:43 +00:00
Rewrite strcpy usage
This commit is contained in:
parent
946de514dc
commit
f5bfbdeebe
@ -1077,7 +1077,7 @@ static bool cg_d3d9_renderchain_add_lut(void *data,
|
||||
|
||||
info.tex = lut;
|
||||
info.smooth = smooth;
|
||||
strcpy(info.id, id);
|
||||
strlcpy(info.id, id, sizeof(info.id));
|
||||
if (!lut)
|
||||
return false;
|
||||
|
||||
|
@ -287,7 +287,7 @@ bool content_save_state(const char *path, bool save_to_disk)
|
||||
|
||||
memcpy(undo_load_buf.data, data, info.size);
|
||||
undo_load_buf.size = info.size;
|
||||
strcpy(undo_load_buf.path, path);
|
||||
strlcpy(undo_load_buf.path, path, sizeof(undo_load_buf.path));
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -352,7 +352,7 @@ bool content_load_state(const char *path, bool load_to_backup_buffer)
|
||||
|
||||
memcpy(undo_save_buf.data, buf, size);
|
||||
undo_save_buf.size = size;
|
||||
strcpy(undo_save_buf.path, path);
|
||||
strlcpy(undo_save_buf.path, path, sizeof(undo_save_buf.path));
|
||||
|
||||
free(buf);
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user