From aa59faec168326365c6bdc6743dffec336862a6a Mon Sep 17 00:00:00 2001 From: Daniel Brahneborg Date: Wed, 6 Mar 2002 20:00:39 +0000 Subject: Make a correct comparison with buffer length. --- lib/siscomponentrecord.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/siscomponentrecord.cpp') diff --git a/lib/siscomponentrecord.cpp b/lib/siscomponentrecord.cpp index fb1c05e..091f2b2 100644 --- a/lib/siscomponentrecord.cpp +++ b/lib/siscomponentrecord.cpp @@ -36,7 +36,7 @@ SISComponentNameRecord::fillFrom(uint8_t* buf, int base, off_t len, SISFile* sisFile) { int n = sisFile->m_header.m_nlangs; - if (base + 8 + n * 4 * 2) + if (base + 8 + n * 4 * 2 > len) return SIS_TRUNCATED; uint8_t* p = buf + base; -- cgit v1.2.3