From: František Dvořák Date: Sun, 27 Nov 2011 18:04:42 +0000 (+0000) Subject: Check that the response from gsoap call is not empty, to prevent possible crash ... X-Git-Tag: merge_30_head_take2_dst~8 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=655bb6c9b1af343bdd581b8bdd8dc99ecc6f232c;p=jra1mw.git Check that the response from gsoap call is not empty, to prevent possible crash (it may happen with incompatible gsoap library). --- diff --git a/org.gridsite.core/src/htproxyput.c b/org.gridsite.core/src/htproxyput.c index dea36fd..031a502 100644 --- a/org.gridsite.core/src/htproxyput.c +++ b/org.gridsite.core/src/htproxyput.c @@ -335,6 +335,12 @@ int main(int argc, char *argv[]) return 1; } + if (!getNewProxyReqResponse.getNewProxyReqReturn) + { + fprintf(stderr, "Empty response from getNewProxyReq\n"); + return 1; + } + reqtxt = getNewProxyReqResponse.getNewProxyReqReturn->proxyRequest; delegation_id = getNewProxyReqResponse.getNewProxyReqReturn->delegationID;