Just take ReadonlyBytes instead of a raw pointer. Fixes #7072 (tested with the ASAN build fixed by #7060).