Skip to content

Commit

Permalink
Fix minor formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
maxammann committed Feb 7, 2024
1 parent 3abc253 commit dd0e30e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,13 @@ as it has a couple of nice features (buttons, etc.)
* Replace HTML tables with markdown ones (https://jmalarcon.github.io/markdowntables/)
* If you split your document, fix internal links.
* Add missing images.
* Fix `<`, …, “, ’
* Adjust markdown captions ## -> #
* Verify missing formatting in PRO TIPs
* . at the end of fig captions?
* Slugs for directories??
* Note that index bundles do not use the "slug"
### Custom enviornments
```
Expand Down
4 changes: 2 additions & 2 deletions content/docs/fuzzing/c-cpp/11-aflpp/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -811,8 +811,8 @@ If you are fuzzing C projects that produce static libraries, you can follow this
1. Read the `INSTALL` file in the project’s codebase (or other appropriate documentation) and find out how to create a static library.
2. Set the compiler to Clang, and pass additional flags to the compiler during compilation.
3. Build the static library, set the environment variable `AFL_USE_ASAN=1`, and pass the flag `-fsanitize=fuzzer-no-link `to the C compiler, which enables fuzzing-related instrumentations, without linking in the fuzzing engine. The runtime, which includes the `main` symbol, is linked later when using the `-fsanitize=fuzzer` flag. The build step will create a static library, which we will refer to as `$static_library`. The environment variable enables ASan to detect memory corruption.
4. Find the compiled static library from step 3 and call: `./afl++ <host/docker> AFL_USE_ASAN=1 afl-clang-fast++ -fsanitize=fuzzer $static_library harness.cc -o fuzz`.
5. You can start fuzzing by calling `./afl++ <host/docker> afl-fuzz -i seeds -o out -- ./fuzz`.
4. Find the compiled static library from step 3 and call: `./afl++ <host/docker> AFL_USE_ASAN=1 afl-clang-fast++ -fsanitize=fuzzer $static_library harness.cc -o fuzz`.
5. You can start fuzzing by calling `./afl++ <host/docker> afl-fuzz -i seeds -o out -- ./fuzz`.

Let’s go through these instructions for the well-known libpng library. First, we get the source code:

Expand Down
2 changes: 1 addition & 1 deletion content/docs/fuzzing/c-cpp/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ For a general introduction about fuzzing and fuzzing setup (e.g., the harness, f

## When should I use which fuzzer? {#when-should-i-use-which-fuzzer}


<!-- TODO translate table to md -->
{{< rawHtml >}}
<table>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion content/docs/fuzzing/rust/techniques/02-obstacles/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if checksum != expected_hash {
Note that this means that your SUT is behaving differently during fuzzing and production. Carelessly skipping checks can lead to false positives during fuzzing. For example, skipping the validation of a config file might lead to crashes in the SUT because the code expects config values to have a certain format. If the validation ensures that the config contains non-zero integers, then code called after the validation could misbehave when zero values are encountered. See the following example for an illustration.


{{< customFigure "Problematic usage of <code>cfg!(fuzzing)</code>that skips config validation. This may lead to false positives during fuzzing." >}}
{{< customFigure "Problematic usage of `cfg!(fuzzing)` that skips config validation. This may lead to false positives during fuzzing." >}}
```Rust
if !cfg!(fuzzing) {
config.validate()?; // return error if config contains zero values
Expand Down

0 comments on commit dd0e30e

Please sign in to comment.