Skip to content

Commit

Permalink
Use snprintf
Browse files Browse the repository at this point in the history
  • Loading branch information
raub committed Oct 29, 2024
1 parent 80d204f commit 77a022f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cpp/segfault-handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,11 +421,11 @@ DBG_EXPORT JS_METHOD(setLogPath) { NAPI_ENV;
LET_STR_ARG(0, path);

if (!path.length()) {
strcpy(logFilePath, "segfault.log");
snprintf(logFilePath, sizeof(logFilePath), "%s", "segfault.log");
RET_UNDEFINED;
}

strcpy(logFilePath, path.c_str());
snprintf(logFilePath, sizeof(logFilePath), "%s", path.c_str());
RET_UNDEFINED;
}

Expand Down

0 comments on commit 77a022f

Please sign in to comment.