aboutsummaryrefslogtreecommitdiffstats
path: root/lib/oauth2.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2011-12-20 17:42:17 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2011-12-20 17:42:17 +0100
commitf9789d46aac59f1ff28bc532d8589c1661fa7c4b (patch)
tree78ab438dc728c825535c1d6444cff11c3ea5a070 /lib/oauth2.c
parent4b53c65a82eaf2be3741a9551435432d051e2734 (diff)
NULL-checking in rfc822_get_header() and OAuth response handling.
Diffstat (limited to 'lib/oauth2.c')
-rw-r--r--lib/oauth2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/oauth2.c b/lib/oauth2.c
index 4a9d256c..0348d0d0 100644
--- a/lib/oauth2.c
+++ b/lib/oauth2.c
@@ -112,7 +112,7 @@ static void oauth2_access_token_done( struct http_request *req )
if( req->status_code != 200 )
{
}
- else if( strstr( content_type, "application/json" ) )
+ else if( content_type && strstr( content_type, "application/json" ) )
{
atoken = oauth2_json_dumb_get( req->reply_body, "access_token" );
rtoken = oauth2_json_dumb_get( req->reply_body, "refresh_token" );