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:
gavin@gavinsharp.com 2008-04-13 18:15:45 -07:00
Родитель 93251784d1
Коммит fddc35bcf1
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -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();
}
}