From ed960eacc2fe7cb4748597abbbdfe76d2498b374 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Wed, 3 Jan 2018 10:15:17 -0500 Subject: [PATCH] fix offset --- libi2pd/Garlic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libi2pd/Garlic.cpp b/libi2pd/Garlic.cpp index f9c297f6..53493722 100644 --- a/libi2pd/Garlic.cpp +++ b/libi2pd/Garlic.cpp @@ -563,7 +563,7 @@ namespace garlic uint8_t * gwHash = buf; buf += 32; offset = buf1 - buf; - if (offset + 4 > (int)len || offset <= 0) + if (offset + 4 > (int)len || offset < 4) { LogPrint (eLogError, "Garlic: message is too short"); break;