diff options
| author | jackpoz <giacomopoz@gmail.com> | 2015-01-31 22:59:21 +0100 |
|---|---|---|
| committer | jackpoz <giacomopoz@gmail.com> | 2015-01-31 22:59:21 +0100 |
| commit | 95b1204798d3ab2a141f81b294b064255c335b8a (patch) | |
| tree | 2bce20cdd58a44618534b47cea40351402655c46 /src/server/shared | |
| parent | a7ca78b2fe12c68e561782416bf5726410a3c01b (diff) | |
Core/Misc: Properly sanitize ReputationSpillover data
Fix an issue added in 024b57bb74a664cd515cf0822d4b8e939a91fe03 that didn't properly skip ReputationSpillover rows with invalid data.
Fix also a static analysis issue reported by Coverity.
Diffstat (limited to 'src/server/shared')
| -rw-r--r-- | src/server/shared/DataStores/DBCStore.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/server/shared/DataStores/DBCStore.h b/src/server/shared/DataStores/DBCStore.h index abc64c17220..d9cd8472fa7 100644 --- a/src/server/shared/DataStores/DBCStore.h +++ b/src/server/shared/DataStores/DBCStore.h @@ -87,6 +87,13 @@ class DBCStorage return (id >= nCount) ? NULL : indexTable.asT[id]; } + T const* AssertEntry(uint32 id) const + { + T const* entry = LookupEntry(id); + ASSERT(entry); + return entry; + } + uint32 GetNumRows() const { return nCount; } char const* GetFormat() const { return fmt; } uint32 GetFieldCount() const { return fieldCount; } |
