From 580c80a54015103cee540fe8a3faa2f694e8a59c Mon Sep 17 00:00:00 2001 From: orbisai0security Date: Sat, 16 May 2026 08:05:47 +0000 Subject: [PATCH] fix: V-001 security vulnerability Automated security fix generated by Orbis Security AI --- plot/plotVers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plot/plotVers.c b/plot/plotVers.c index 5eab30dd..90904935 100644 --- a/plot/plotVers.c +++ b/plot/plotVers.c @@ -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, sizeof(fileName), "%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, sizeof(command), PlotVersCommand, PlotVersPrinter, fileName); if (system(command) != 0) { TxError("Couldn't execute spooler command to print \"%s\"\n",