File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed
Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -39,17 +39,20 @@ jobs:
3939 LLVM_PROFILE_FILE="request.profraw" ./build/request_parser /tmp/corpus/ seeds/request_parser/ -max_total_time=30
4040 LLVM_PROFILE_FILE="response.profraw" ./build/response_parser /tmp/corpus/ seeds/response_parser/ -max_total_time=30
4141 LLVM_PROFILE_FILE="sha1.profraw" ./build/sha1 -max_total_time=30
42+ LLVM_PROFILE_FILE="base64.profraw" ./build/base64 -max_total_time=30
4243
4344 - name : Generate coverage report
4445 run : |
4546 llvm-profdata merge -o coverage.profdata \
4647 request.profraw \
4748 response.profraw \
48- sha1.profraw
49+ sha1.profraw \
50+ base64.profraw
4951 llvm-cov export -format=lcov -instr-profile coverage.profdata \
5052 -object ./build/request_parser \
5153 -object ./build/response_parser \
5254 -object ./build/sha1 \
55+ -object ./build/base64 \
5356 -sources ./src \
5457 > coverage_${{github.sha}}.txt
5558
Original file line number Diff line number Diff line change @@ -76,4 +76,5 @@ if (HTTP_BUILD_FUZZERS)
7676 add_fuzz(request_parser fuzz/request_parser.cpp)
7777 add_fuzz(response_parser fuzz/response_parser.cpp)
7878 add_fuzz(sha1 fuzz/sha1.cpp)
79+ add_fuzz(base64 fuzz/base64.cpp)
7980endif ()
Original file line number Diff line number Diff line change 1+ #include < cstdint>
2+ #include < cstddef>
3+ #include < http.h>
4+
5+ extern " C" int LLVMFuzzerTestOneInput (const uint8_t * data, size_t size)
6+ {
7+ auto encoded = http::base64_encode (size, data);
8+ auto decoded = http::base64_decode (encoded);
9+ return 0 ;
10+ }
You can’t perform that action at this time.
0 commit comments