diff --git a/async-toolkit/atools/lib/archive.c b/async-toolkit/atools/lib/archive.c index ba17dba2e..f925ab859 100644 --- a/async-toolkit/atools/lib/archive.c +++ b/async-toolkit/atools/lib/archive.c @@ -120,13 +120,13 @@ void add_recent(char *archive, char *member, char *output) entry->uses=1; entry->archive=leak_realloc(entry->archive,strlen(archive)+1); - strcpy(entry->archive,archive); + strncpy(entry->archive,archive,strlen(archive)+1); entry->member=leak_realloc(entry->member,strlen(member)+1); - strcpy(entry->member,member); + strncpy(entry->member,member,strlen(member)+1); entry->output=leak_realloc(entry->output,strlen(output)+1); - strcpy(entry->output,output); + strncpy(entry->output,output,strlen(output)+1); } int archive_extract(char *archive, char *member, char *output)