summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/build/eolstrip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/build/eolstrip.c b/tools/build/eolstrip.c
index e93b45e906..091b06e47e 100644
--- a/tools/build/eolstrip.c
+++ b/tools/build/eolstrip.c
@@ -171,7 +171,9 @@ process(char *arg)
error( ERR_ERRNO | ERR_FATAL, "Unable to open file (%s)\n", arg );
if ( !test_only ) {
- sprintf( outname, "%s.eoltmp", arg );
+ length = snprintf( outname, BUFFER_SIZE, "%s.eoltmp", arg );
+ if (length >= BUFFER_SIZE)
+ error( ERR_ERRNO | ERR_FATAL, "Tmp file name too long\n" );
out = fopen( outname, "w" );
if (!out)