From 33a6efead82f857f72b688280a3705e22fe5633f Mon Sep 17 00:00:00 2001 From: Michael Beale Date: Thu, 30 Oct 2025 17:17:35 -0700 Subject: [PATCH] Potential fix for code scanning alert no. 149: Possibly wrong buffer size in string copy Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- async-toolkit/atools/lib/archive.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/async-toolkit/atools/lib/archive.c b/async-toolkit/atools/lib/archive.c index f925ab859..ba17dba2e 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); - strncpy(entry->archive,archive,strlen(archive)+1); + strcpy(entry->archive,archive); entry->member=leak_realloc(entry->member,strlen(member)+1); - strncpy(entry->member,member,strlen(member)+1); + strcpy(entry->member,member); entry->output=leak_realloc(entry->output,strlen(output)+1); - strncpy(entry->output,output,strlen(output)+1); + strcpy(entry->output,output); } int archive_extract(char *archive, char *member, char *output)