Commit 6ac49461 authored by Janne Grunau's avatar Janne Grunau Committed by Ronald S. Bultje

fix skip_mode_params parsing if enable_order_hint == 0

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/
    #6 0x403489 in _start (/home/janne/src/dav1d/build-usan/tools/dav1d+0x403489)

I can't reproduce the ubsan error in the issue.
parent 5b67e1a2
Pipeline #1102 passed with stage
in 2 minutes and 5 seconds