Bug 1436809 - Check that stream message was converted to string correctly. r=valentin
This commit is contained in:
@@ -1052,6 +1052,9 @@ public:
|
||||
nsresult rv = NS_ReadInputStreamToString(mMsg.pStream, *temp, mLength);
|
||||
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (temp->Length() != mLength) {
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
mMsg.pStream->Close();
|
||||
mMsg.pStream->Release();
|
||||
|
||||
Reference in New Issue
Block a user