Skip to content

index out of bounds in loop_filter_h_sb128uv_c() src/loopfilter.c

Found with commit acd90b71

Steps to reproduce:

  1. build dav1d with UndefinedBehaviorSanitizer (-fsanitize=bounds)
  2. run attached testcase with dav1d executable ./dav1d -i testcase.ivf -o out.ivf

testcase.ivf

src/loopfilter.c:212:27: runtime error: index 190 out of bounds for type 'uint8_t const[64]'
    #0 0x637c44 in loop_filter_h_sb128uv_c src/loopfilter.c:212:27
    #1 0x6b03eb in filter_plane_cols_uv src/lf_apply.c:100:9
    #2 0x6b03eb in dav1d_loopfilter_sbrow_16bpc src/lf_apply.c:246
    #3 0x679674 in dav1d_filter_sbrow_16bpc src/recon.c:1456:9
    #4 0x519c31 in dav1d_decode_frame src/decode.c:2576:25
    #5 0x520d30 in dav1d_submit_frame src/decode.c:2956:20
    #6 0x4fd87b in dav1d_parse_obus src/obu.c:1075:20
    #7 0x4f6687 in dav1d_decode src/lib.c:193:20
    #8 0x4eaa77 in main tools/dav1d.c:108:20
    #9 0x7f8215ad182f in __libc_start_main /build/glibc-Cl5G7W/glibc-2.23/csu/libc-start.c:291
    #10 0x418d38 in _start (dav1d+0x418d38)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information