Re: [PATCH] apply: avoid out-of-bounds access in fuzzy_matchlines()

2017-11-11 Thread Junio C Hamano
René Scharfe writes: > fuzzy_matchlines() uses a pointers to the first and last characters of > two lines to keep track while matching them. This makes it impossible > to deal with empty strings. It accesses characters before the start of > empty lines. It can also access characters after the

[PATCH] apply: avoid out-of-bounds access in fuzzy_matchlines()

2017-11-11 Thread René Scharfe
fuzzy_matchlines() uses a pointers to the first and last characters of two lines to keep track while matching them. This makes it impossible to deal with empty strings. It accesses characters before the start of empty lines. It can also access characters after the end when checking for trailing