From c7c6f38c144142563e135eceb5daed492c203a85 Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Fri, 25 Jun 2021 01:51:22 +0200 Subject: fix free() of potentially uninitialized pointer and minor refactors in service --- checker/src/checker.py | 2 +- checker/test.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'checker') diff --git a/checker/src/checker.py b/checker/src/checker.py index 9a2044f..a7bc8f4 100644 --- a/checker/src/checker.py +++ b/checker/src/checker.py @@ -120,7 +120,7 @@ class STLDoctorChecker(BaseChecker): else: content = b"solid\n" facet_count = rand.randint(4, 30) - indent = bytes([rand.choice(b"\t\n ") for i in range(rand.randint(1, 4))]) + indent = bytes([rand.choice(b"\t ") for i in range(rand.randint(1, 4))]) for fi in range(facet_count): if malformed and randchoice == 0: # malformed by wrong keyword content += indent * 1 + b"facet nornal " diff --git a/checker/test.sh b/checker/test.sh index c3df08c..101ae55 100644 --- a/checker/test.sh +++ b/checker/test.sh @@ -44,7 +44,7 @@ try() { python3 src/checker.py -j run -v "$variant" -x 4000 \ --flag ENOTESTFLAG123= --flag_regex 'ENO.*=' -i $taskid \ ${@:3} "$cmd" > "$tmpfile" - res="$(cat $tmpfile | grep -a Result: | tail -n1 | grep -a -o OK)" + res="$(cat $tmpfile | grep -a -o 'Result: .*' | tail -n1 | cut -d' ' -f2)" fi if [ "$res" != "OK" ]; then newfile="fails/err-$pid" -- cgit v1.2.3-71-gd317