зеркало из https://github.com/mozilla/pjs.git
fix corruption and or crash when runing quicktime plugin r=peterl, sr=darin, a=sspitzer 206530
This commit is contained in:
Родитель
e0e54f2fec
Коммит
02a2e252e5
|
@ -365,14 +365,9 @@ ns4xPluginStreamListener::OnDataAvailable(nsIPluginStreamInfo* pluginInfo,
|
|||
if ((PRInt32)mNPStream.end < streamOffset)
|
||||
mNPStream.end = streamOffset;
|
||||
|
||||
PRUint32 bytesToRead = mStreamBufferSize;
|
||||
if (length < mStreamBufferSize) {
|
||||
// do not read more that supplier wants us to read
|
||||
bytesToRead = length;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
PRUint32 bytesToRead = PR_MIN(length, mStreamBufferSize);
|
||||
PRInt32 amountRead = 0;
|
||||
rv = input->Read(mStreamBuffer, bytesToRead, (PRUint32*)&amountRead);
|
||||
if (amountRead == 0 || NS_FAILED(rv)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче