aboutsummaryrefslogtreecommitdiffstats
path: root/lib/siscomponentrecord.cpp
diff options
context:
space:
mode:
authorDaniel Brahneborg <basic@chello.se>2002-03-06 20:00:39 +0000
committerDaniel Brahneborg <basic@chello.se>2002-03-06 20:00:39 +0000
commitaa59faec168326365c6bdc6743dffec336862a6a (patch)
tree319a35661e095fa72b91f513856ff18174ca28a9 /lib/siscomponentrecord.cpp
parentad5dc27f6c70745c87377e4fda154aa149660d49 (diff)
downloadplptools-aa59faec168326365c6bdc6743dffec336862a6a.tar.gz
plptools-aa59faec168326365c6bdc6743dffec336862a6a.tar.bz2
plptools-aa59faec168326365c6bdc6743dffec336862a6a.zip
Make a correct comparison with buffer length.
Diffstat (limited to 'lib/siscomponentrecord.cpp')
-rw-r--r--lib/siscomponentrecord.cpp2
1 files changed, 1 insertions, 1 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;