mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-09-02 23:08:19 +02:00
Changed two sprintf() to snprint() on recommendation from an AI.
This commit is contained in:
+2
-2
@@ -1218,7 +1218,7 @@ PlotVersatec(scx, layers, xMask, user_scale)
|
||||
|
||||
/* Compute the name of the file to use for output, and open it. */
|
||||
|
||||
sprintf(fileName, "%s/magicPlotXXXXXX", PlotTempDirectory);
|
||||
snprintf(fileName, 200, "%s/magicPlotXXXXXX", PlotTempDirectory);
|
||||
result = mkstemp(fileName);
|
||||
if (result == -1)
|
||||
{
|
||||
@@ -1474,7 +1474,7 @@ PlotVersatec(scx, layers, xMask, user_scale)
|
||||
|
||||
TxPrintf("\n");
|
||||
fclose(file);
|
||||
sprintf(command, PlotVersCommand, PlotVersPrinter, fileName);
|
||||
snprintf(command, 300, PlotVersCommand, PlotVersPrinter, fileName);
|
||||
if (system(command) != 0)
|
||||
{
|
||||
TxError("Couldn't execute spooler command to print \"%s\"\n",
|
||||
|
||||
Reference in New Issue
Block a user