diff options
Diffstat (limited to 'linden/indra/llvfs/llvfs.cpp')
-rw-r--r-- | linden/indra/llvfs/llvfs.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/linden/indra/llvfs/llvfs.cpp b/linden/indra/llvfs/llvfs.cpp index a41aa78..b83d12c 100644 --- a/linden/indra/llvfs/llvfs.cpp +++ b/linden/indra/llvfs/llvfs.cpp | |||
@@ -307,6 +307,8 @@ LLVFS::LLVFS(const char *index_filename, const char *data_filename, const BOOL r | |||
307 | { | 307 | { |
308 | llwarns << "Couldn't open vfs data file after trying many alternates" << llendl; | 308 | llwarns << "Couldn't open vfs data file after trying many alternates" << llendl; |
309 | mValid = VFSVALID_BAD_CANNOT_CREATE; | 309 | mValid = VFSVALID_BAD_CANNOT_CREATE; |
310 | delete[] temp_index; | ||
311 | delete[] temp_data; | ||
310 | return; | 312 | return; |
311 | } | 313 | } |
312 | 314 | ||
@@ -394,7 +396,6 @@ LLVFS::LLVFS(const char *index_filename, const char *data_filename, const BOOL r | |||
394 | // to heal after some errors. JC | 396 | // to heal after some errors. JC |
395 | if (block->mLength > 0 && | 397 | if (block->mLength > 0 && |
396 | (U32)block->mLength <= data_size && | 398 | (U32)block->mLength <= data_size && |
397 | block->mLocation >= 0 && | ||
398 | block->mLocation < data_size && | 399 | block->mLocation < data_size && |
399 | block->mSize > 0 && | 400 | block->mSize > 0 && |
400 | block->mSize <= block->mLength && | 401 | block->mSize <= block->mLength && |
@@ -435,7 +436,7 @@ LLVFS::LLVFS(const char *index_filename, const char *data_filename, const BOOL r | |||
435 | delete block; | 436 | delete block; |
436 | } | 437 | } |
437 | 438 | ||
438 | tmp_ptr += block->SERIAL_SIZE; | 439 | tmp_ptr += LLVFSFileBlock::SERIAL_SIZE; |
439 | } | 440 | } |
440 | delete[] buffer; | 441 | delete[] buffer; |
441 | 442 | ||
@@ -658,6 +659,7 @@ void LLVFS::presizeDataFile(const U32 size) | |||
658 | if (!mDataFP) | 659 | if (!mDataFP) |
659 | { | 660 | { |
660 | llerrs << "LLVFS::presizeDataFile() with no data file open" << llendl; | 661 | llerrs << "LLVFS::presizeDataFile() with no data file open" << llendl; |
662 | return; | ||
661 | } | 663 | } |
662 | 664 | ||
663 | // we're creating this file for the first time, size it | 665 | // we're creating this file for the first time, size it |
@@ -1731,7 +1733,6 @@ void LLVFS::audit() | |||
1731 | 1733 | ||
1732 | // do sanity check on this block | 1734 | // do sanity check on this block |
1733 | if (block->mLength >= 0 && | 1735 | if (block->mLength >= 0 && |
1734 | block->mLocation >= 0 && | ||
1735 | block->mSize >= 0 && | 1736 | block->mSize >= 0 && |
1736 | block->mSize <= block->mLength && | 1737 | block->mSize <= block->mLength && |
1737 | block->mFileType >= LLAssetType::AT_NONE && | 1738 | block->mFileType >= LLAssetType::AT_NONE && |