diff options
author | Daniel Brahneborg <basic@chello.se> | 2002-03-28 09:47:25 +0000 |
---|---|---|
committer | Daniel Brahneborg <basic@chello.se> | 2002-03-28 09:47:25 +0000 |
commit | 81e05de4391c11fad7faf9bc164f92e128a49d25 (patch) | |
tree | d69f635c5986154f4e629a8f16de42676ccbbf11 /lib/sisfile.cpp | |
parent | 1d9b2e0e156f9a58bd642b9f9e8b2a08e768f5ed (diff) | |
download | plptools-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.cpp | 6 |
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; } } |