DF-0281 / run.sh
#!/bin/sh # DF-0281 code-level proof run. # Runs the vulnerable arithmetic (expect SIGFPE) then the guarded variant. set +e cd "$(dirname "$0")" echo "=================== VULNERABLE PATH (mtu=0, no guard) ===================" echo "+ ./divzero_proof" ./divzero_proof echo "VULN_EXIT=$?" echo echo "=================== GUARDED PATH (-DFIX_MTU: clamp mtu!=0) ===================" echo "+ ./divzero_proof_fixed" ./divzero_proof_fixed echo "FIXED_EXIT=$?" |