diff --git a/source/menu/menu_game.cpp b/source/menu/menu_game.cpp index b2377998..d2bee610 100644 --- a/source/menu/menu_game.cpp +++ b/source/menu/menu_game.cpp @@ -487,12 +487,12 @@ void CMenu::_game(bool launch) if (GC_GameIsInstalled((char *)hdr->hdr.id, DeviceName[SD], DML_DIR)) { memset(hdr->path, 0, sizeof(hdr->path)); - snprintf(hdr->path, sizeof(hdr->path), "%s", (char*)hdr->hdr.id); + strncpy(hdr->path, (char*)hdr->hdr.id, sizeof(hdr->path)); } else if(GC_GameIsInstalled(gcfolder, DeviceName[SD], DML_DIR)) { memset(hdr->path, 0, sizeof(hdr->path)); - snprintf(hdr->path, sizeof(hdr->path), "%s", gcfolder); + strncpy(hdr->path, gcfolder, sizeof(hdr->path)); } else if(!GC_GameIsInstalled(hdr->path, DeviceName[SD], DML_DIR) && !_wbfsOp(CMenu::WO_COPY_GAME)) break; diff --git a/source/menu/menu_wbfs.cpp b/source/menu/menu_wbfs.cpp index 200a1b6a..a3bbe889 100644 --- a/source/menu/menu_wbfs.cpp +++ b/source/menu/menu_wbfs.cpp @@ -340,7 +340,7 @@ bool CMenu::_wbfsOp(CMenu::WBFS_OP op) char gcfolder[300]; char dmlgamedir[50]; - snprintf(dmlgamedir, sizeof(dmlgamedir), "%s", (currentPartition != SD) ? m_DMLgameDir.c_str() : DML_DIR); + strncpy(dmlgamedir, (currentPartition != SD) ? m_DMLgameDir.c_str() : DML_DIR, sizeof(dmlgamedir)); snprintf(gcfolder, sizeof(gcfolder), "%s [%s]", gcheader.title, (char *)gcheader.id); if (_searchGamesByID((const char *) gcheader.id).size() != 0 || GC_GameIsInstalled((char *)gcheader.id, DeviceName[currentPartition], dmlgamedir) || GC_GameIsInstalled(gcfolder, DeviceName[currentPartition], dmlgamedir)) {