From 959d49a7ef8dfdc47e9e182207f75904fc7a1686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9sz=C3=A1ros=20Mih=C3=A1ly?= Date: Mon, 12 Sep 2016 09:40:06 +0200 Subject: [PATCH] set nonce ptr to null if string is empty --- src/apps/oauth/oauth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/oauth/oauth.c b/src/apps/oauth/oauth.c index c849804..26c9ec9 100644 --- a/src/apps/oauth/oauth.c +++ b/src/apps/oauth/oauth.c @@ -115,7 +115,7 @@ static int encode_token(const char* server_name, ns_bzero(&etoken,sizeof(etoken)); // TODO: avoid this hack - if (!*gcm_nonce) gcm_nonce='\0'; + if (!*gcm_nonce) gcm_nonce=NULL; if (encode_oauth_token((const u08bits *) server_name, &etoken, &key, &ot,(const u08bits *) gcm_nonce) < 0) { fprintf(stderr, "%s: cannot encode oauth token\n",