From 9626b5e8c9d5a797bd9a692be8ed872dd8ead0f3 Mon Sep 17 00:00:00 2001 From: "R. Timothy Edwards" Date: Tue, 19 May 2026 12:21:54 -0400 Subject: [PATCH] Changed two sprintf() to snprint() on recommendation from an AI. --- VERSION | 2 +- plot/plotVers.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 858efdc7..641fc72d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.644 +8.3.645 diff --git a/plot/plotVers.c b/plot/plotVers.c index 5eab30dd..fed4d522 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, 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",