More toward GitHub issue #56

This commit is contained in:
Adam Ierymenko 2014-04-10 16:30:15 -07:00
parent c9294c1a78
commit aee742e767
12 changed files with 113 additions and 27 deletions

View file

@ -89,7 +89,7 @@ public:
{
for(unsigned int h=0;h<ZT_ANTIRECURSION_HISTORY_SIZE;++h) {
ArItem *i = &(_history[h]);
if ((len >= i->len)&&(!memcmp(((const unsigned char *)data) + (len - i->len),i->tail,i->len)))
if ((i->len > 0)&&(len >= i->len)&&(!memcmp(((const unsigned char *)data) + (len - i->len),i->tail,i->len)))
return false;
}
return true;