From a12d9e8b5de75c5d60cd620a223d7195a127b2fb Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Sat, 25 Apr 2026 16:04:16 +0100 Subject: [PATCH] Fix binascii fuzzer and make CI stricter --- .github/workflows/build.yml | 3 ++- fuzzer.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b438269..2fb658b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,4 +53,5 @@ jobs: python infra/helper.py check_build python3-libraries \ --engine libfuzzer \ --sanitizer ${{ matrix.sanitizer }} \ - --architecture x86_64 + --architecture x86_64 \ + -e ALLOWED_BROKEN_TARGETS_PERCENTAGE=0 diff --git a/fuzzer.cpp b/fuzzer.cpp index 915d655..deb46e8 100644 --- a/fuzzer.cpp +++ b/fuzzer.cpp @@ -79,10 +79,11 @@ extern "C" int LLVMFuzzerInitialize(int* argc, char*** argv) { } { + const std::string absoluteScriptDir = absoluteScriptPath.substr(0, absoluteScriptPath.find_last_of('/')); std::string setPYTHONPATH; setPYTHONPATH += "import sys"; setPYTHONPATH += "\n"; - setPYTHONPATH += "sys.path.append('" + absoluteScriptPath + "')\n"; + setPYTHONPATH += "sys.path.append('" + absoluteScriptDir + "')\n"; setPYTHONPATH += "\n"; if ( PyRun_SimpleString(setPYTHONPATH.c_str()) != 0 ) { printf("Fatal: Cannot set PYTHONPATH\n");