Skip to content

Commit

Permalink
Update main.c
Browse files Browse the repository at this point in the history
  • Loading branch information
israpps committed Feb 22, 2024
1 parent d46575e commit 6700173
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2737,17 +2737,17 @@ int main(int argc, char *argv[])
#ifdef SUPPORT_SYSTEM_2X6
#define ACJV_PATHCNT 5
int id, ret;
const char* ACJVPATHS[ACJV_PATHCNT] = {"ACJVLOAD.IRX", "mc0:/ACJVLOAD.IRX", "mc1:/ACJVLOAD.IRX", "mass0:/ACJVLOAD.IRX", "mass1:/ACJVLOAD.IRX"};
const char* ACJVPATHS[ACJV_PATHCNT] = {"./ACJVLOAD.IRX", "mc0:/ACJVLOAD.IRX", "mc1:/ACJVLOAD.IRX", "mass0:/ACJVLOAD.IRX", "mass1:/ACJVLOAD.IRX"};
for (i=0;i<ACJV_PATHCNT;i++) {
id = SifLoadStartModule(ACJVPATHS[i], 0, NULL, &ret);
DPRINTF(" [%s]: ID=%d, ret=%d\n", ACJVPATHS[i], id, ret);
if (id>0&&ret!=1) {
if (id>0) { //like ADDDRV, we only care if module made it's way to the IOP. since it always returns NO_RESIDENT_END
i = -1;
break;
}
}
sprintf(mainMsg + strlen(mainMsg), (i == -1) ? " ACJVLOAD.IRX loaded":" ACJVLOAD.IRX not found");
DPRINTF(mainMsg);
sprintf(mainMsg + strlen(mainMsg), (i == -1) ? " | ACJVLOAD.IRX loaded" : " | ACJVLOAD.IRX not found");

Check warning on line 2749 in src/main.c

View check run for this annotation

codefactor.io / CodeFactor

src/main.c#L2749

Buffer copy without checking size of input (CWE-120) (flawfinder7-sprintf)
DPRINTF("%s\n",mainMsg);
#endif

//Here nearly everything is ready for the main menu event loop
Expand Down

0 comments on commit 6700173

Please sign in to comment.