зеркало из https://github.com/mozilla/pjs.git
Bug 421828: about:cache hexdump does not truncate buffer, overwrites counter, patch by Jan Darmochwal <jdarmochwal@gmx.de>, r=biesi, sr=bzbarsky, a=schrep
This commit is contained in:
Родитель
93251784d1
Коммит
fddc35bcf1
|
@ -392,9 +392,10 @@ nsAboutCacheEntry::WriteCacheEntryDescription(nsIOutputStream *outputStream,
|
|||
PRUint32 count = PR_MIN(dataSize, sizeof(chunk));
|
||||
if (NS_FAILED(stream->Read(chunk, count, &n)) || n == 0)
|
||||
break;
|
||||
dataSize -= n;
|
||||
HexDump(&hexDumpState, chunk, n, buffer);
|
||||
outputStream->Write(buffer.get(), buffer.Length(), &n);
|
||||
dataSize -= n;
|
||||
buffer.Truncate();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче