mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 854105 - Avoid gcc 4.7 complaining about array out of bounds in nsDiskCacheMap::WriteDataCacheBlocks. r=michal
This commit is contained in:
parent
2fd2630889
commit
8aca99fe1a
5
netwerk/cache/nsDiskCacheMap.cpp
vendored
5
netwerk/cache/nsDiskCacheMap.cpp
vendored
@ -1034,7 +1034,10 @@ nsDiskCacheMap::WriteDataCacheBlocks(nsDiskCacheBinding * binding, char * buffer
|
||||
int32_t startBlock = 0;
|
||||
|
||||
if (size > 0) {
|
||||
while (1) {
|
||||
// if fileIndex is 0, bad things happen below, which makes gcc 4.7
|
||||
// complain, but it's not supposed to happen. See bug 854105.
|
||||
MOZ_ASSERT(fileIndex);
|
||||
while (fileIndex) {
|
||||
uint32_t blockSize = GetBlockSizeForIndex(fileIndex);
|
||||
blockCount = ((size - 1) / blockSize) + 1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user