fix: V-001 security vulnerability

Automated security fix generated by Orbis Security AI
This commit is contained in:
orbisai0security 2026-05-16 08:05:47 +00:00
parent 256955f48e
commit 580c80a540
1 changed files with 2 additions and 2 deletions

View File

@ -1218,7 +1218,7 @@ PlotVersatec(scx, layers, xMask, user_scale)
/* Compute the name of the file to use for output, and open it. */ /* Compute the name of the file to use for output, and open it. */
sprintf(fileName, "%s/magicPlotXXXXXX", PlotTempDirectory); snprintf(fileName, sizeof(fileName), "%s/magicPlotXXXXXX", PlotTempDirectory);
result = mkstemp(fileName); result = mkstemp(fileName);
if (result == -1) if (result == -1)
{ {
@ -1474,7 +1474,7 @@ PlotVersatec(scx, layers, xMask, user_scale)
TxPrintf("\n"); TxPrintf("\n");
fclose(file); fclose(file);
sprintf(command, PlotVersCommand, PlotVersPrinter, fileName); snprintf(command, sizeof(command), PlotVersCommand, PlotVersPrinter, fileName);
if (system(command) != 0) if (system(command) != 0)
{ {
TxError("Couldn't execute spooler command to print \"%s\"\n", TxError("Couldn't execute spooler command to print \"%s\"\n",