mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 854105 - Avoid gcc 4.7 complaining about array out of bounds in nsDiskCacheMap::WriteDataCacheBlocks. r=michal
This commit is contained in:
parent
e8f40134e0
commit
4ea8165c3c
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