diff options
author | Armada <jules.blok@gmail.com> | 2013-09-08 02:09:10 +0400 |
---|---|---|
committer | Armada <jules.blok@gmail.com> | 2013-09-08 02:09:34 +0400 |
commit | c77a6a8b7eb8f391ab8395a9bf2f38af6ca677a8 (patch) | |
tree | e5a1366a7669066f99b43804172a60a27651de30 /src | |
parent | af634fabf17f02562135f82ab091a176b3e40c19 (diff) |
WebClientSocket: Fixed case where return value of AsyncReader::Length() was not checked.
As reported by Coverity in CID 1084352.
Change PPageFileInfoDetails for consistency.
Diffstat (limited to 'src')
-rw-r--r-- | src/mpc-hc/PPageFileInfoDetails.cpp | 2 | ||||
-rw-r--r-- | src/mpc-hc/WebClientSocket.cpp | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/mpc-hc/PPageFileInfoDetails.cpp b/src/mpc-hc/PPageFileInfoDetails.cpp index 7761f71d0..a46dbdb49 100644 --- a/src/mpc-hc/PPageFileInfoDetails.cpp +++ b/src/mpc-hc/PPageFileInfoDetails.cpp @@ -159,8 +159,8 @@ BOOL CPPageFileInfoDetails::OnInitDialog() LONGLONG total, available;
if (SUCCEEDED(pAR->Length(&total, &available))) {
size = total;
+ break;
}
- break;
}
}
EndEnumPins;
diff --git a/src/mpc-hc/WebClientSocket.cpp b/src/mpc-hc/WebClientSocket.cpp index cc9ff4279..5b94f39aa 100644 --- a/src/mpc-hc/WebClientSocket.cpp +++ b/src/mpc-hc/WebClientSocket.cpp @@ -457,9 +457,10 @@ bool CWebClientSocket::OnInfo(CStringA& hdr, CStringA& body, CStringA& mime) BeginEnumPins(pBF, pEP, pPin) {
if (CComQIPtr<IAsyncReader> pAR = pPin) {
LONGLONG total, available;
- pAR->Length(&total, &available);
- size = total;
- break;
+ if (SUCCEEDED(pAR->Length(&total, &available))) {
+ size = total;
+ break;
+ }
}
}
EndEnumPins;
|