зеркало из https://github.com/mozilla/gecko-dev.git
bug 244349 : Bulletproof webservice proxy code against
crashes when server sends invalid SOAP response. r+sr=jst
This commit is contained in:
Родитель
ad65f9094a
Коммит
5239c247d5
|
@ -312,13 +312,20 @@ WSPCallContext::CallCompletionListener()
|
|||
partBinding->GetLocation(&location);
|
||||
|
||||
nsCOMPtr<nsISOAPBlock> block;
|
||||
if (location == nsISOAPPartBinding::LOCATION_HEADER) {
|
||||
if (location == nsISOAPPartBinding::LOCATION_HEADER &&
|
||||
headerEntry < headerCount) {
|
||||
block = do_QueryInterface(headerBlocks[headerEntry++]);
|
||||
}
|
||||
else if (location == nsISOAPPartBinding::LOCATION_BODY) {
|
||||
else if (location == nsISOAPPartBinding::LOCATION_BODY &&
|
||||
bodyEntry < bodyCount) {
|
||||
block = do_QueryInterface(bodyBlocks[bodyEntry++]);
|
||||
}
|
||||
|
||||
if (!block) {
|
||||
rv = NS_ERROR_UNEXPECTED;
|
||||
goto call_completion_end;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsISchemaComponent> schemaComponent;
|
||||
rv = part->GetSchemaComponent(getter_AddRefs(schemaComponent));
|
||||
if (NS_FAILED(rv)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче