t8001/t8002: blame: demonstrate -L bounds checking bug
commit580b4f3acf076f5f3346206d3c54912ffc663d86
authorEric Sunshine <sunshine@sunshineco.com>
Wed, 31 Jul 2013 08:15:36 +0000 (31 04:15 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 5 Aug 2013 18:54:31 +0000 (5 11:54 -0700)
tree207ca4b3b12d638f0b023c844c9917fb3be8ae88
parentf350cf9ea5058ca0ad9e02033616d574c59ee064
t8001/t8002: blame: demonstrate -L bounds checking bug

A bounds checking bug allows the X in -LX to extend one line past the
end of file. For example, given a file with 5 lines, -L6 is accepted as
valid. Demonstrate this problem.

While here, also add tests to check that the remaining cases of X and Y
in -LX,Y are handled correctly at and in the vicinity of end-of-file.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/annotate-tests.sh