Skip to content

Instantly share code, notes, and snippets.

Fuzzing CDT: Finding, reproducing, and reporting bugs

Introduction

This is a tutorial on how to write a fuzzer for a non-trivial real-world library, namely Artem Amirkhanov's CDT. It is a library for computing Constrained Delaunay Triangulations (CDTs, hence the name of the library). We will be working from the 9d99b32ae56b26cd2781678dc4405c98b8679a9f commit, since that is what I originally wrote the fuzzer for, and that way, we will be able to rediscover the same bugs I found back then.

If you want to follow along, clone the library using

$ git clone https://github.com/artem-ogre/CDT
$ cd CDT
@htfy96
htfy96 / cpp-build-profile-2024.md
Last active April 2, 2024 16:48
C++ Build profiles for 2024 projects

C++ Build profiles for 2024 projects

Standard development profile

This profile achieves 50% - 80% release profile performance, while also provides a reasonable amount of safety checks and debugging support. This should also be the profile for your CI build.

Compilation flags

-Og -Wall -Wextra -D_FORTIFY_SOURCE=2 -fstack-protector-strong -g -D_GLIBCXX_ASSERTIONS
@Meltwin
Meltwin / Noetic-Ubuntu22.04.md
Last active April 29, 2024 17:46
Installing ROS1 Noetic on Ubuntu 22.04

The process is pretty similar to the standard installation from source except for some fixes that you will have to make during the installation. I will keep the same header so you can keep a track on both guide at the same time (follow the official website for more explication, I will only write the steps to make).

1 - Prerequisites

1.1 - Installing bootstrap dependencies

To install bootstrap dependencies

Moved to repo: /quenhus/uBlock-Origin-dev-filter

In order to keep filters up to date, please use this repo.

@mrlnc
mrlnc / free5gc_wireguard.md
Created February 8, 2021 12:45
Wireguard on Linux 5.0.0-23-generic (for Free5GC)

So you're using free5gc (hence stuck on linux 5.0.0-23-generic) and want to use wireguard VPN.

tl;dr you need wireguard-linux-compat tag v1.0.20200520

git clone https://git.zx2c4.com/wireguard-linux-compat
cd wireguard-linux-compat
git checkout v1.0.20200520
cd ..
make -C wireguard-linux-compat/src -j$(nproc)
make -C wireguard-linux-compat/src -j$(nproc) install
@agutenkunst
agutenkunst / 00sourcetrail_ros_instructions.md
Last active September 5, 2022 07:48
Use Sourcetrail with ROS

Use Sourcetrail with ROS

1. Build your workspace with the required cmake flag

Building your workspace with -DCMAKE_EXPORT_COMPILE_COMMANDS=ON which will create a file compile_commands.json in your build/<pkg> directory containing all compiler calls.

colcon build --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON

2. Add the project to sourcetrail

See images below

@ggerganov
ggerganov / iss-docking.js
Created May 16, 2020 12:30
Automatic ISS Docking in Javascript
// Auto-pilot for docking with the International Space Station
//
// The program uses Artificial Intelligence and Decision Trees (i.e. basic kinematics and a bunch of if statements)
// to perform docking with the ISS from any starting position.
//
// To use it:
// - open the SpaceX simulation website: https://iss-sim.spacex.com/
// - open the Developer's console and paste the contents of this file
//
// Demo: https://youtu.be/jWQQH2_UGLw
@jen20
jen20 / install-jetbrains-toolbox.sh
Created September 16, 2019 16:37
Script for installing JetBrains Toolbox on Linux
#!/bin/bash
[ $(id -u) != "0" ] && exec sudo "$0" "$@"
echo -e " \e[94mInstalling Jetbrains Toolbox\e[39m"
echo ""
function getLatestUrl() {
USER_AGENT=('User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36')
URL=$(curl 'https://data.services.jetbrains.com//products/releases?code=TBA&latest=true&type=release' -H 'Origin: https://www.jetbrains.com' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: en-US,en;q=0.8' -H "${USER_AGENT[@]}" -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'Referer: https://www.jetbrains.com/toolbox/download/' -H 'Connection: keep-alive' -H 'DNT: 1' --compressed | grep -Po '"linux":.*?[^\\]",' | awk -F ':' '{print $3,":"$4}'| sed 's/[", ]//g')
@maxidorius
maxidorius / notes.md
Last active November 16, 2023 00:05
Notes on privacy and data collection of Matrix.org

Notes on privacy and data collection of Matrix.org


This version of the document is no longer canonical. You can find the canonical version hosted at Gitlab and Github.

PART 2 IS OUT, INCLUDING THE DISCLOSURE OF A GLOBAL FEDERATION DATA LEAK, AND THE ANATOMY OF A GDPR DATA REQUEST HANDLED BY MATRIX.ORG. SEE THE REPOS ABOVE.

@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active April 10, 2024 20:23
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}