Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
Android.bp | D | 03-May-2024 | 660 | 27 | 25 | |
README.md | D | 03-May-2024 | 1.5 KiB | 71 | 60 | |
ossfuzz.sh | D | 03-May-2024 | 1.3 KiB | 44 | 21 | |
xaac_dec_fuzzer.cpp | D | 03-May-2024 | 30.9 KiB | 875 | 585 | |
xaac_dec_fuzzer.dict | D | 03-May-2024 | 40 | 3 | 2 |
README.md
1# Fuzzer for libxaac decoder 2 3This describes steps to build xaac_dec_fuzzer binary. 4 5## Linux x86/x64 6 7### Requirements 8- cmake (3.5 or above) 9- make 10- clang (6.0 or above) 11 needs to support -fsanitize=fuzzer, -fsanitize=fuzzer-no-link 12 13### Steps to build 14Clone libxaac repository 15``` 16$ git clone https://android.googlesource.com/platform/external/libxaac 17``` 18Create a directory inside libxaac and change directory 19``` 20 $ cd libxaac 21 $ mkdir build 22 $ cd build 23``` 24Build libxaac using cmake 25``` 26 $ CC=clang CXX=clang++ cmake ../ \ 27 -DSANITIZE=fuzzer-no-link,address,signed-integer-overflow 28 $ make 29 ``` 30Build the fuzzer 31``` 32 $ clang++ -std=c++11 -fsanitize=fuzzer,address -I. -I../ -I../common \ 33 -I../decoder -I../decoder/drc_src -Wl,--start-group \ 34 ../fuzzer/xaac_dec_fuzzer.cpp -o ./xaac_dec_fuzzer ./libxaacdec.a \ 35 -Wl,--end-group 36``` 37 38### Steps to run 39Create a directory CORPUS_DIR and copy some elementary aac files to that folder 40To run the fuzzer 41``` 42$ ./xaac_dec_fuzzer CORPUS_DIR 43``` 44 45## Android 46 47### Steps to build 48Build the fuzzer 49``` 50 $ SANITIZE_TARGET=address SANITIZE_HOST=address mmma -j$(nproc) \ 51 external/libxaac/fuzzer 52``` 53 54### Steps to run 55Create a directory CORPUS_DIR and copy some elementary aac files to that folder 56Push this directory to device. 57 58To run on device 59``` 60 $ adb sync data 61 $ adb shell /data/fuzz/xaac_dec_fuzzer CORPUS_DIR 62``` 63To run on host 64``` 65 $ $ANDROID_HOST_OUT/fuzz/xaac_dec_fuzzer CORPUS_DIR 66``` 67 68## References: 69 * http://llvm.org/docs/LibFuzzer.html 70 * https://github.com/google/oss-fuzz 71