aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/siscomponentrecord.cpp2
-rw-r--r--lib/sisreqrecord.cpp2
2 files changed, 2 insertions, 2 deletions
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;
diff --git a/lib/sisreqrecord.cpp b/lib/sisreqrecord.cpp
index f734e51..9d32a88 100644
--- a/lib/sisreqrecord.cpp
+++ b/lib/sisreqrecord.cpp
@@ -29,7 +29,7 @@ SisRC
SISReqRecord::fillFrom(uint8_t* buf, int* base, off_t len, SISFile* sisFile)
{
int n = sisFile->m_header.m_nreqs;
- if (*base + 12 + n * 4 * 2)
+ if (*base + 12 + n * 4 * 2 > len)
return SIS_TRUNCATED;
uint8_t* p = buf + *base;