Skip to content
  • Janne Grunau's avatar
    fix skip_mode_params parsing if enable_order_hint == 0 · 6ac49461
    Janne Grunau authored and Ronald S. Bultje's avatar Ronald S. Bultje committed
    Fix following ubsan error in #68:
    ../src/env.h:296:24: runtime error: shift exponent -1 is negative
    [Detaching after fork from child process 22253]
        #0 0x7ffff76ad6f9 in get_poc_diff /home/janne/src/dav1d/build-usan/../src/env.h:296:24
        #1 0x7ffff76ad6f9 in parse_frame_hdr /home/janne/src/dav1d/build-usan/../src/obu.c:757
        #2 0x7ffff7696491 in dav1d_parse_obus /home/janne/src/dav1d/build-usan/../src/obu.c:1023:20
        #3 0x7ffff7921c7d in dav1d_decode /home/janne/src/dav1d/build-usan/../src/lib.c:193:20
        #4 0x424869 in main /home/janne/src/dav1d/build-usan/../tools/dav1d.c:108:20
        #5 0x7ffff63dfae6 in __libc_start_main (/lib64/libc.so.6+0x21ae6)
        #6 0x403489 in _start (/home/janne/src/dav1d/build-usan/tools/dav1d+0x403489)
    
    I can't reproduce the ubsan error in the issue.
    6ac49461