From 077fb3d32d7dee9450e31388bf82ff00576a055a Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 19 Sep 2015 03:46:41 +0200 Subject: [PATCH] (libretro-db) Replace strcpy --- libretro-db/libretrodb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libretro-db/libretrodb.c b/libretro-db/libretrodb.c index 3b2b1290b0..5e2e5843b3 100644 --- a/libretro-db/libretrodb.c +++ b/libretro-db/libretrodb.c @@ -1,5 +1,5 @@ -#include "libretrodb.h" +#include #include #ifdef _WIN32 #include @@ -11,10 +11,10 @@ #include #include -#include - #include +#include +#include "libretrodb.h" #include "rmsgpack_dom.h" #include "rmsgpack.h" #include "bintree.h" @@ -196,7 +196,7 @@ int libretrodb_open(const char *path, libretrodb_t *db) if (!fd) return -errno; - strcpy(db->path, path); + strlcpy(db->path, path, sizeof(db->path)); db->root = retro_fseek(fd, 0, SEEK_CUR); if ((rv = retro_fread(fd, &header, sizeof(header))) == -1)