From 921674b3f1585dde76d13f181abcfc6d49bd737d Mon Sep 17 00:00:00 2001 From: Rene Treffer Date: Thu, 3 Apr 2014 10:51:05 +0200 Subject: Fix negative jump targets --- src/de/measite/minidns/util/NameUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/de') diff --git a/src/de/measite/minidns/util/NameUtil.java b/src/de/measite/minidns/util/NameUtil.java index a7edc22a..91a6649d 100644 --- a/src/de/measite/minidns/util/NameUtil.java +++ b/src/de/measite/minidns/util/NameUtil.java @@ -70,7 +70,7 @@ public class NameUtil { ) { int c = data[offset] & 0xff; if ((c & 0xc0) == 0xc0) { - c = ((c & 0x3f) << 8) + data[offset + 1]; + c = ((c & 0x3f) << 8) + (data[offset + 1] & 0xff); if (jumps.contains(c)) { throw new IllegalStateException("Cyclic offsets detected."); } -- cgit v1.2.3