bug 244349 : Bulletproof webservice proxy code against

crashes when server sends invalid SOAP response.
r+sr=jst
This commit is contained in:
hpradhan%hotpop.com 2004-05-31 08:46:12 +00:00
Родитель ad65f9094a
Коммит 5239c247d5
1 изменённых файлов: 9 добавлений и 2 удалений

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

@ -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)) {