From 4c5d176b0d3c1cbddb320c0d0b1693a7909a4a0e Mon Sep 17 00:00:00 2001 From: Erno Kilpelainen Date: Fri, 5 Jun 2026 10:40:11 +0000 Subject: [PATCH] Fix High severity coverity finding: CWE-78(OS Commadn injection (https://cwe.mitre.org/data/definitions/78.html) --- test/testkiss.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/testkiss.py b/test/testkiss.py index 474de4d..2e69330 100755 --- a/test/testkiss.py +++ b/test/testkiss.py @@ -100,15 +100,14 @@ def dofft(x, isreal): x = 2147483647.0 * x scale = len(x) / 2147483647.0 - cmd = util + ' -n ' - cmd += ','.join([str(d) for d in dims]) + cmd = [util, '-n', ','.join([str(d) for d in dims])] if do_real: - cmd += ' -R ' + cmd.append('-R') - print(cmd) + print(' '.join(cmd)) from subprocess import Popen, PIPE - p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE) + p = Popen(cmd, stdin=PIPE, stdout=PIPE) p.stdin.write(dopack(x)) p.stdin.close()