Skip to content

dav1d: Fix theoretical invalid pointer dereference

Marvin Scholz requested to merge ePirat/dav1d:fix-invalid-ptr-deref into master

Fix a theoretical bug found by the clang static analyzer: In theory num_muxers could be smaller than res, never evaluating the loop (as the condition would be false) but not satisfying the i == num_muxers case, so proceeding and dereferencing the never initialized impl pointer.

Fixing this is simple: Changed the num_muxers and index variables to unsigned so num_muxers can never be smaller than i.

Merge request reports

Loading