From 88e27dee0302da97ffbe43d6a3ae5bc8a4f0c8d1 Mon Sep 17 00:00:00 2001 From: Ilari Liusvaara Date: Thu, 10 Nov 2011 00:54:28 +0200 Subject: [PATCH] Don't misdecode 1 byte repeat counts 0xFE and 0xFF --- src/core/rrdata.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/rrdata.cpp b/src/core/rrdata.cpp index e84961a4..0570ca51 100644 --- a/src/core/rrdata.cpp +++ b/src/core/rrdata.cpp @@ -225,7 +225,7 @@ uint64_t rrdata::read(std::vector& strm, bool dummy) throw(std::bad_alloc) ptr += lengthbytes; } if(lengthbytes == 1) - repeat = 2 + buf2[0]; + repeat = 2 + static_cast(buf2[0]); if(lengthbytes == 2) repeat = 258 + static_cast(buf2[0]) * 256 + buf2[1]; if(lengthbytes == 3)