aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sisfile.cpp
diff options
context:
space:
mode:
authorDaniel Brahneborg <basic@chello.se>2002-03-28 09:47:25 +0000
committerDaniel Brahneborg <basic@chello.se>2002-03-28 09:47:25 +0000
commit81e05de4391c11fad7faf9bc164f92e128a49d25 (patch)
treed69f635c5986154f4e629a8f16de42676ccbbf11 /lib/sisfile.cpp
parent1d9b2e0e156f9a58bd642b9f9e8b2a08e768f5ed (diff)
downloadplptools-81e05de4391c11fad7faf9bc164f92e128a49d25.tar.gz
plptools-81e05de4391c11fad7faf9bc164f92e128a49d25.tar.bz2
plptools-81e05de4391c11fad7faf9bc164f92e128a49d25.zip
Some buffer overrun checks.
Removed the --force flag.
Diffstat (limited to 'lib/sisfile.cpp')
-rw-r--r--lib/sisfile.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/sisfile.cpp b/lib/sisfile.cpp
index 62a2ce1..df60695 100644
--- a/lib/sisfile.cpp
+++ b/lib/sisfile.cpp
@@ -110,6 +110,7 @@ SISFile::fillFrom(uint8_t* buf, off_t len)
n = m_header.m_nfiles;
m_fileRecords = new SISFileRecord[n];
ix = m_header.m_filesPtr;
+ SisRC myrc = SIS_OK;
for (int i = 0; i < n; ++i)
{
if (ix >= len)
@@ -118,7 +119,10 @@ SISFile::fillFrom(uint8_t* buf, off_t len)
if (rc != SIS_OK)
{
printf(_("Problem reading file record %d, rc = %d.\n"), i, rc);
- return rc;
+ if (rc == SIS_TRUNCATEDDATA)
+ myrc = rc;
+ else
+ return rc;
}
}