From 09194cbacbf0b30586fe93c402668153fedfaef2 Mon Sep 17 00:00:00 2001 From: rr- Date: Sat, 30 Jan 2016 21:08:14 +0100 Subject: [PATCH] algo/pack/lzss: fix buffer overflow (tests only) --- src/algo/pack/lzss.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algo/pack/lzss.cc b/src/algo/pack/lzss.cc index 1fd1a01b1..0698df6b4 100644 --- a/src/algo/pack/lzss.cc +++ b/src/algo/pack/lzss.cc @@ -258,7 +258,7 @@ LzssEncoderState::LzssEncoderState( dict_size(dict_size), max_match_size(max_match_size), empty(dict_size), - text_buf(dict_size + max_match_size), + text_buf(dict_size + max_match_size + 1), dad(dict_size + 1) { children[0].resize(dict_size + 1);