mkvtoolnix/tests/test-563segfaults_issue_1780_part_6.rb
Moritz Bunkus 21b5bd3f6b HEVC parser: prevent access to beyond the end of fixed-size arrays
The three arrays delta_poc[], user[] and ref_id[] all have 17
entries. Therefore the loop limits determined by num_pics,
num_positive_pics and num_negative_pics must be checked for validity
before iterating over the arrays.

Fixes the following test cases of #1780:

explorer🆔000110,sig:11,src:000003,op:flip1,pos:0
explorer🆔000699,sig:11,src:002364,op:flip1,pos:138
2016-09-06 23:06:37 +02:00

15 lines
442 B
Ruby
Executable File

#!/usr/bin/ruby -w
# T_563segfaults_issue_1780_part_6
describe "mkvmerge / various test cases for segfaults collected in issue 1780 part 6"
dir = "data/segfaults-assertions/issue-1780"
# "HEVC parser: prevent access to beyond the end of fixed-size arrays"
%w{
explorer:id:000110,sig:11,src:000003,op:flip1,pos:0
explorer:id:000699,sig:11,src:002364,op:flip1,pos:138
}.each do |file|
test_merge "#{dir}/#{file}", :exit_code => :error
end