Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #/!bin/bash
- #
- # Requirements:
- # ulimit -c unlimited
- # echo "core.%p" > /proc/sys/kernel/core_pattern
- # add volatile to fuzzer.c:144
- # <------><------>volatile struct rohc_buf rohc_packet =
- # <------><------><------>rohc_buf_init_empty(rohc_buffer, PACKET_MAX_SIZE);
- #
- cat <<EOF >./gdb.script
- up 100
- dump binary memory rohc_crash rohc_packet.data rohc_packet.data+rohc_packet.len
- quit
- EOF
- for corefile in `ls core.*`; do
- echo $corefile
- gdb -x gdb.script ./app/fuzzer/rohc_fuzzer ./$corefile
- fname=`echo $corefile | sed 's/\./_/g'`
- xxd -i rohc_crash > crash_$fname.h
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement