summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--alpine/xoauth2conf.c10
-rw-r--r--imap/src/c-client/auth_oa2.c10
-rw-r--r--imap/src/c-client/http.c12
-rw-r--r--imap/src/c-client/json.c2
-rw-r--r--pith/ical.c2
-rw-r--r--pith/pine.hlp2
6 files changed, 21 insertions, 17 deletions
diff --git a/alpine/xoauth2conf.c b/alpine/xoauth2conf.c
index 3509ef6e..2e7ce49a 100644
--- a/alpine/xoauth2conf.c
+++ b/alpine/xoauth2conf.c
@@ -162,7 +162,7 @@ xoauth_parse_client_info(char *lvalp, char **namep, char **idp, char **secretp)
if (lvalp == NULL) return;
- if(s = strstr(lvalp, XNAME)){
+ if((s = strstr(lvalp, XNAME)) != NULL){
s += strlen(XNAME);
if(*s == '"') s++;
for(t = s; *t && *t != '"' && *t != ' '; t++);
@@ -172,7 +172,7 @@ xoauth_parse_client_info(char *lvalp, char **namep, char **idp, char **secretp)
*t = c;
}
- if(s = strstr(lvalp, XID)){
+ if((s = strstr(lvalp, XID)) != NULL){
s += strlen(XID);
if(*s == '"') s++;
for(t = s; *t && *t != '"' && *t != ' '; t++);
@@ -182,7 +182,7 @@ xoauth_parse_client_info(char *lvalp, char **namep, char **idp, char **secretp)
*t = c;
}
- if(s = strstr(lvalp, XSECRET)){
+ if((s = strstr(lvalp, XSECRET)) != NULL){
s += strlen(XSECRET);
if(*s == '"') s++;
for(t = s; *t && *t != '"' && *t != ' '; t++);
@@ -219,6 +219,7 @@ alpine_xoauth2_configuration(struct pine *ps, int edit_exceptions)
dprint((3, "-- alpine_xoauth2_configuration --\n"));
+ expose_hidden_config = F_ON(F_EXPOSE_HIDDEN_CONFIG, ps_global);
ew = edit_exceptions ? ps_global->ew_for_except_vars : Main;
if(ps->restricted)
@@ -309,6 +310,9 @@ alpine_xoauth2_configuration(struct pine *ps, int edit_exceptions)
ctmpa->help = NO_HELP;
ctmpa->valoffset = 1;
ctmpa->value = cpystr(alpine_oauth2_list[i].name);
+ ctmpa->varname = NULL;
+ ctmpa->varnamep = ctmpb = ctmpa;
+
/* Setup client-id variable */
varlist[l]->name = cpystr(XOAUTH2_CLIENT_ID);
diff --git a/imap/src/c-client/auth_oa2.c b/imap/src/c-client/auth_oa2.c
index 76a529eb..a636bc4a 100644
--- a/imap/src/c-client/auth_oa2.c
+++ b/imap/src/c-client/auth_oa2.c
@@ -44,19 +44,19 @@ char *oauth2_generate_state(void)
rv[0] = '\0';
for(i = 0; i < 4; i++)
- sprintf(rv + strlen(rv), "%x", random() % 256);
+ sprintf(rv + strlen(rv), "%x", (unsigned int) (random() % 256));
sprintf(rv + strlen(rv), "%c", '-');
for(i = 0; i < 2; i++)
- sprintf(rv + strlen(rv), "%x", random() % 256);
+ sprintf(rv + strlen(rv), "%x", (unsigned int) (random() % 256));
sprintf(rv + strlen(rv), "%c", '-');
for(i = 0; i < 2; i++)
- sprintf(rv + strlen(rv), "%x", random() % 256);
+ sprintf(rv + strlen(rv), "%x", (unsigned int) (random() % 256));
sprintf(rv + strlen(rv), "%c", '-');
for(i = 0; i < 2; i++)
- sprintf(rv + strlen(rv), "%x", random() % 256);
+ sprintf(rv + strlen(rv), "%x", (unsigned int) (random() % 256));
sprintf(rv + strlen(rv), "%c", '-');
for(i = 0; i < 6; i++)
- sprintf(rv + strlen(rv), "%x", random() % 256);
+ sprintf(rv + strlen(rv), "%x", (unsigned int) (random() % 256));
rv[36] = '\0';
return cpystr(rv);
}
diff --git a/imap/src/c-client/http.c b/imap/src/c-client/http.c
index 7d95112b..3f351959 100644
--- a/imap/src/c-client/http.c
+++ b/imap/src/c-client/http.c
@@ -919,11 +919,11 @@ http_post_param(char *url, HTTP_PARAM_S *param)
HTTPSTREAM *stream;
HTTP_PARAM_S enc_param;
HTTP_REQUEST_S *http_request;
- char *reply;
+ char *reply = NULL;
int i;
if(url == NULL || param == NULL || (stream = http_open(url)) == NULL)
- return NULL;
+ return reply;
http_request = http_request_get();
http_request->request = http_request_line("POST", stream->urltail, HTTP_1_1_VERSION);
@@ -995,7 +995,7 @@ http_post_param2(char *url, HTTP_PARAM_S *param)
char *
http_get_param(char *base_url, HTTP_PARAM_S *param)
{
- char *url, *reply;
+ char *url, *reply = NIL;
url = http_get_param_url(base_url, param);
if(url){
@@ -1009,14 +1009,14 @@ char *
http_get(char *url)
{
HTTP_REQUEST_S *http_request;
- char *reply;
+ char *reply = NIL;
HTTPSTREAM *stream;
- if(!url) return NIL;
+ if(!url) return reply;
stream = http_open(url);
if(!stream){
fs_give((void **) &url);
- return NIL;
+ return reply;
}
http_request = http_request_get();
diff --git a/imap/src/c-client/json.c b/imap/src/c-client/json.c
index f6d05736..9a3e1671 100644
--- a/imap/src/c-client/json.c
+++ b/imap/src/c-client/json.c
@@ -335,7 +335,7 @@ json_value_parse(unsigned char **s)
JSON_S *
json_array_parse(unsigned char **s)
{
- JSON_S *j;
+ JSON_S *j = NIL;
unsigned char *w = *s;
json_skipws(w);
diff --git a/pith/ical.c b/pith/ical.c
index e2f482fa..332ed5d4 100644
--- a/pith/ical.c
+++ b/pith/ical.c
@@ -1763,7 +1763,7 @@ ical_free_duration(ICAL_DURATION_S **ic_d)
int
ical_parse_duration(char *value, ICAL_DURATION_S *ic_d)
{
- int i, j, rv = 0;
+ int i, j = 0, rv = 0;
if(value == NULL || ic_d == NULL) return -1;
diff --git a/pith/pine.hlp b/pith/pine.hlp
index 527a0e89..9af9db94 100644
--- a/pith/pine.hlp
+++ b/pith/pine.hlp
@@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any
reasonable place to be called from.
Dummy change to get revision in pine.hlp
============= h_revision =================
-Alpine Commit 425 2020-05-11 23:22:23
+Alpine Commit 426 2020-05-13 00:30:15
============= h_news =================
<HTML>
<HEAD>