Fix #6460: Crash when reading corrupt object files

- Move sawyer coding functions to SawyerChunkReader.
- Replace assertions with exceptions to prevent crash on invalid chunks.
This commit is contained in:
Ted John authored and Michael Steenbeek committed 2017-10-22 16:21:13 +02:00
1 parent 5c98c7ee5e
commit 8d1710d798
4 files changed
+141 -6

No files matched your search

+1 -1
View File
@@ -363,7 +363,7 @@ private:
std::sort(_items.begin(), _items.end(), [](const ObjectRepositoryItem &a,
const ObjectRepositoryItem &b) -> bool
{
return strcmp(a.Name, b.Name) < 0;
return String::Compare(a.Name, b.Name) < 0;
});
// Fix the IDs