[cpp-sp] 07/09: SSPCPP-728 - Missing nullptr check in implicit std::string construction
Scott Cantor
cantor.2 at osu.edu
Mon Nov 13 11:46:31 EST 2017
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch maint-2.6
in repository cpp-sp.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=4c2de08ad865aff808f06d777b9f970c72349b0d
commit 4c2de08ad865aff808f06d777b9f970c72349b0d
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Sun Nov 12 21:07:39 2017 -0500
SSPCPP-728 - Missing nullptr check in implicit std::string construction
https://issues.shibboleth.net/jira/browse/SSPCPP-728
---
shibsp/handler/impl/RemotedHandler.cpp | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/shibsp/handler/impl/RemotedHandler.cpp b/shibsp/handler/impl/RemotedHandler.cpp
index 529682a..d99a20d 100644
--- a/shibsp/handler/impl/RemotedHandler.cpp
+++ b/shibsp/handler/impl/RemotedHandler.cpp
@@ -500,8 +500,11 @@ pair<bool,long> RemotedHandler::unwrap(SPRequest& request, DDF& out) const
return make_pair(true, request.sendRedirect(h.string()));
h = out["response"];
if (h.isstruct()) {
- istringstream s(h["data"].string());
- return make_pair(true, request.sendResponse(s, h["status"].integer()));
+ const char* data = h["data"].string();
+ if (data) {
+ istringstream s(data);
+ return make_pair(true, request.sendResponse(s, h["status"].integer()));
+ }
}
return make_pair(false, 0L);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list