fuzz: fix shell script bugs and remove dead code
What changed, and why it matters
This commit fixes a typo in a fuzz-testing shell script and removes an unused helper function. It only affects internal testing tooling, not the library code that users rely on. There is no security impact on the Rust Bitcoin library itself.
No security action required. Treat as a normal maintenance/testing fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change removes the dead targetFileToHFuzzInputArg function from fuzz/fuzz-util.sh and corrects a malformed string in fuzz/fuzz.sh by removing an extraneous trailing escaped double quote (\"). This ensures the HFUZZ_INPUT_ARGS variable is set to a valid argument string when a fuzzing corpus directory exists. The patch is confined to fuzzing harness scripts and does not alter any production code, cryptographic logic, or public APIs.
Changed components
fuzz/fuzz-util.shfuzz/fuzz.shInspect captured patch +1 / −9
diff --git a/fuzz/fuzz-util.sh b/fuzz/fuzz-util.sh
index 776afc70..df53adde 100755
--- a/fuzz/fuzz-util.sh
+++ b/fuzz/fuzz-util.sh
@@ -20,14 +20,6 @@ targetFileToName() {
| sed 's/^_//g'
}
-targetFileToHFuzzInputArg() {
- baseName=$(basename "$1")
- dirName="${baseName%.*}"
- if [ -d "hfuzz_input/$dirName" ]; then
- echo "HFUZZ_INPUT_ARGS=\"-f hfuzz_input/$FILE/input\""
- fi
-}
-
listTargetNames() {
for target in $(listTargetFiles); do
targetFileToName "$target"
diff --git a/fuzz/fuzz.sh b/fuzz/fuzz.sh
index 22ced4de..897b29a0 100755
--- a/fuzz/fuzz.sh
+++ b/fuzz/fuzz.sh
@@ -25,7 +25,7 @@ for targetFile in $targetFiles; do
targetName=$(targetFileToName "$targetFile")
echo "Fuzzing target $targetName ($targetFile)"
if [ -d "hfuzz_input/$targetName" ]; then
- HFUZZ_INPUT_ARGS="-f hfuzz_input/$targetName/input\""
+ HFUZZ_INPUT_ARGS="-f hfuzz_input/$targetName/input"
else
HFUZZ_INPUT_ARGS=""
fi
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.