From 9b6d49d5394402a3802e0ab461f6cb96b85c576a Mon Sep 17 00:00:00 2001 From: arvidn Date: Fri, 23 Aug 2019 13:43:34 +0200 Subject: [PATCH] explicitly use integer division in python script. make minimize.sh script fail on errors, instead of silently ignoring them --- fuzzers/minimize.sh | 1 + fuzzers/tools/generate_initial_corpus.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fuzzers/minimize.sh b/fuzzers/minimize.sh index 802d868a8..4141dbe31 100755 --- a/fuzzers/minimize.sh +++ b/fuzzers/minimize.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -e function minimize { diff --git a/fuzzers/tools/generate_initial_corpus.py b/fuzzers/tools/generate_initial_corpus.py index daec31dae..d2fa40b76 100644 --- a/fuzzers/tools/generate_initial_corpus.py +++ b/fuzzers/tools/generate_initial_corpus.py @@ -138,7 +138,7 @@ for i in range(0, 1): messages.append(add_extended_handshake(add_length(struct.pack('BBB', 20, 3, i)))) # bitfields -bitfield_len = (100 + 7)/8 +bitfield_len = (100 + 7) // 8 for i in range(256): messages.append(add_length(struct.pack('B', 5) + (chr(i) * bitfield_len)))