#!/bin/sh
# DF-0832 run script — runs the userspace harness that deterministically
# proves the off-by-one OOB read in udf_bmap_internal's ICB iteration loop.
#
# Expected (bug present, unpatched kernel): harness prints
#   "OOB read detected: YES" and exits 1.
# Expected (after fix, >= instead of >): harness would print
#   "OK: no OOB read (bound is tight)." and exit 0.
#
# The harness replicates the EXACT buggy do/while loop from
# sys/vfs/udf/udf_vnops.c:1101-1111 (short_ad) and :1125-1135 (long_ad).
set -e
cd "$(dirname "$0")"
echo "+ ./harness"
./harness
echo "RUN_EXIT=$?"
