[cpp-sp] branch maint-2 updated: SSPCPP-728 - Missing nullptr check in implicit std::string construction

Scott Cantor cantor.2 at osu.edu
Sun Nov 12 21:08:21 EST 2017


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

scantor pushed a commit to branch maint-2
in repository cpp-sp.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=29b0734f3bf7ac24594aa1d969bc3a21256b6458

The following commit(s) were added to refs/heads/maint-2 by this push:
       new  29b0734   SSPCPP-728 - Missing nullptr check in implicit std::string construction
29b0734 is described below

commit 29b0734f3bf7ac24594aa1d969bc3a21256b6458
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