From 655bb6c9b1af343bdd581b8bdd8dc99ecc6f232c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Sun, 27 Nov 2011 18:04:42 +0000 Subject: [PATCH] Check that the response from gsoap call is not empty, to prevent possible crash (it may happen with incompatible gsoap library). --- org.gridsite.core/src/htproxyput.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; -- 1.8.2.3