[shibboleth-sp2] 07/19: SSPCPP-728 - Missing nullptr check in implicit std::string construction

Ferenc Wágner wferi at moszumanska.debian.org
Wed Nov 15 22:56:45 UTC 2017


This is an automated email from the git hooks/post-receive script.

wferi pushed a commit to branch maint-2.6
in repository shibboleth-sp2.

commit 4c2de08ad865aff808f06d777b9f970c72349b0d
Author: Scott Cantor <cantor.2 at osu.edu>
Date:   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);
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shibboleth/shibboleth-sp2.git



More information about the Pkg-shibboleth-devel mailing list