diff options
author | Daniel Brahneborg <basic@chello.se> | 2002-03-06 20:00:39 +0000 |
---|---|---|
committer | Daniel Brahneborg <basic@chello.se> | 2002-03-06 20:00:39 +0000 |
commit | aa59faec168326365c6bdc6743dffec336862a6a (patch) | |
tree | 319a35661e095fa72b91f513856ff18174ca28a9 /lib/sisreqrecord.cpp | |
parent | ad5dc27f6c70745c87377e4fda154aa149660d49 (diff) | |
download | plptools-aa59faec168326365c6bdc6743dffec336862a6a.tar.gz plptools-aa59faec168326365c6bdc6743dffec336862a6a.tar.bz2 plptools-aa59faec168326365c6bdc6743dffec336862a6a.zip |
Make a correct comparison with buffer length.
Diffstat (limited to 'lib/sisreqrecord.cpp')
-rw-r--r-- | lib/sisreqrecord.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; |