summaryrefslogtreecommitdiff
path: root/pith
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2020-09-19 15:50:20 -0600
committerEduardo Chappa <chappa@washington.edu>2020-09-19 15:50:20 -0600
commit90c9fe5a45ae50ef1c93ad615f549f1ea7f69a33 (patch)
tree3c64a69da362561bdb3bd0257a261d687bba6b68 /pith
parentf12bfecb345d42bc3b57e76b8f2e71548ceefc16 (diff)
downloadalpine-90c9fe5a45ae50ef1c93ad615f549f1ea7f69a33.tar.xz
* clear out some warnings by gcc 9.3.1.
Diffstat (limited to 'pith')
-rw-r--r--pith/pine.hlp2
-rw-r--r--pith/smime.c28
2 files changed, 15 insertions, 15 deletions
diff --git a/pith/pine.hlp b/pith/pine.hlp
index 8412fcaa..81ea5609 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 505 2020-08-29 18:58:26
+Alpine Commit 506 2020-09-19 15:50:17
============= h_news =================
<HTML>
<HEAD>
diff --git a/pith/smime.c b/pith/smime.c
index 795be7f1..72801cd6 100644
--- a/pith/smime.c
+++ b/pith/smime.c
@@ -281,7 +281,7 @@ setup_pwdcert(void **pwdcert)
pc = (PERSONAL_CERT *) ps_global->smime->personal_certs;
if(ps_global->smime->privatetype == Directory){
build_path(pathkey, ps_global->smime->privatepath, pc->name, sizeof(pathkey));
- strncat(pathkey, ".key", 4);
+ strncat(pathkey, ".key", 5);
pathkey[sizeof(pathkey)-1] = '\0';
text = NULL;
} else if (ps_global->smime->privatetype == Container){
@@ -321,7 +321,7 @@ setup_pwdcert(void **pwdcert)
/* now copy the keys and certs, starting by the key... */
build_path(fpath, pathdir, pc->name, sizeof(fpath));
- strncat(fpath, ".key", 4);
+ strncat(fpath, ".key", 5);
fpath[sizeof(fpath)-1] = '\0';
if(our_stat(fpath, &sbuf) == 0){ /* if fpath exists */
if((sbuf.st_mode & S_IFMT) == S_IFREG) /* and is a regular file */
@@ -346,11 +346,11 @@ setup_pwdcert(void **pwdcert)
setup_dir = 0;
build_path(pathkey, ps_global->smime->publicpath, pc->name, sizeof(pathkey));
- strncat(pathkey, ".crt", 4);
+ strncat(pathkey, ".crt", 5);
pathkey[sizeof(pathkey)-1] = '\0';
build_path(fpath, pathdir, pc->name, sizeof(fpath));
- strncat(fpath, ".crt", 4);
+ strncat(fpath, ".crt", 5);
fpath[sizeof(fpath)-1] = '\0';
if(our_stat(fpath, &sbuf) == 0){
@@ -397,11 +397,11 @@ setup_pwdcert(void **pwdcert)
if(certfile && keyfile){
build_path(fpath, pathdir, keyfile, sizeof(fpath));
- strncat(fpath, ".key", 4);
+ strncat(fpath, ".key", 5);
fpath[sizeof(fpath)-1] = '\0';
build_path(fpath2, pathkey, keyfile, sizeof(fpath));
- strncat(fpath2, ".key", 4);
+ strncat(fpath2, ".key", 5);
fpath2[sizeof(fpath2)-1] = '\0';
if(our_copy(fpath, fpath2) == 0)
@@ -478,7 +478,7 @@ smime_expunge_cert(WhichCerts ctype)
if(SMHOLDERTYPE(ctype) == Directory){
build_path(buf, path, cl->next->name, sizeof(buf));
if(ctype == Private && strlen(buf) + strlen(EXTCERT(Private)) < sizeof(buf)){
- strncat(buf, EXTCERT(Private), sizeof(buf) - strlen(buf)-1);
+ strncat(buf, EXTCERT(Private), 5);
buf[sizeof(buf)-1] = '\0';
}
@@ -674,7 +674,7 @@ import_certificate(WhichCerts ctype, PERSONAL_CERT *p_cert, char *fname)
strncpy(PrivateKeyPath, buf, sizeof(PrivateKeyPath));
PrivateKeyPath[sizeof(PrivateKeyPath)-1] = '\0';
if(strlen(PrivateKeyPath) + 4 < sizeof(PrivateKeyPath)){
- strncat(PrivateKeyPath, EXTCERT(Private), 4);
+ strncat(PrivateKeyPath, EXTCERT(Private), 5);
PrivateKeyPath[sizeof(PrivateKeyPath)-1] = '\0';
}
@@ -682,7 +682,7 @@ import_certificate(WhichCerts ctype, PERSONAL_CERT *p_cert, char *fname)
strncpy(full_name_cert, full_name_key, sizeof(full_name_key));
full_name_cert[sizeof(full_name_cert)-1] = '\0';
full_name_cert[strlen(full_name_cert) - strlen(EXTCERT(Private))] = '\0';
- strncat(full_name_cert, EXTCERT(Public), 4);
+ strncat(full_name_cert, EXTCERT(Public), 5);
full_name_cert[sizeof(full_name_cert)-1] = '\0';
@@ -690,7 +690,7 @@ import_certificate(WhichCerts ctype, PERSONAL_CERT *p_cert, char *fname)
strncpy(PublicCertPath, buf, sizeof(PublicCertPath));
PublicCertPath[sizeof(PublicCertPath)-1] = '\0';
if(strlen(PublicCertPath) + 4 < sizeof(PublicCertPath)){
- strncat(PublicCertPath, EXTCERT(Public), 4);
+ strncat(PublicCertPath, EXTCERT(Public), 5);
PublicCertPath[sizeof(PublicCertPath)-1] = '\0';
}
/* attempt #1, use provided certificate,
@@ -795,7 +795,7 @@ import_certificate(WhichCerts ctype, PERSONAL_CERT *p_cert, char *fname)
if(encrypt_file((char *)tmp, text, pc)){ /* we did it! */
build_path(buf, PATHCERTDIR(ctype), pwdcert->name, sizeof(buf));
- strncat(buf, EXTCERT(Private), sizeof(buf) - strlen(buf));
+ strncat(buf, EXTCERT(Private), 5);
buf[sizeof(buf)-1] = '\0';
if(strcmp(PrivateKeyPath, buf)){
if (unlink(buf) < 0)
@@ -867,7 +867,7 @@ import_certificate(WhichCerts ctype, PERSONAL_CERT *p_cert, char *fname)
if(SMHOLDERTYPE(ctype) == Directory){
build_path(buf, PATHCERTDIR(ctype), filename, sizeof(buf));
if(strcmp(buf + strlen(buf) - 4, EXTCERT(ctype)) != 0 && strlen(buf) + 4 < sizeof(buf)){
- strncat(buf, EXTCERT(ctype), sizeof(buf) - strlen(buf) -1);
+ strncat(buf, EXTCERT(ctype), 5);
buf[sizeof(buf)-1] = '\0';
}
rc = our_copy(buf, full_filename);
@@ -892,7 +892,7 @@ import_certificate(WhichCerts ctype, PERSONAL_CERT *p_cert, char *fname)
if(SMHOLDERTYPE(ctype) == Directory){
build_path(buf, PATHCERTDIR(ctype), filename, sizeof(buf));
if(strcmp(buf + strlen(buf) - 4, ".crt") != 0 && strlen(buf) + 4 < sizeof(buf)){
- strncat(buf, EXTCERT(ctype), sizeof(buf) - strlen(buf) - 1);
+ strncat(buf, EXTCERT(ctype), 5);
buf[sizeof(buf)-1] = '\0';
}
@@ -1345,7 +1345,7 @@ get_personal_certs(char *path)
pc = (PERSONAL_CERT *) fs_get(sizeof(*pc));
pc->cert = cert;
pc->name = cpystr(buf2);
- strncat(buf2, EXTCERT(Public), sizeof(buf2) - strlen(buf2) - 1);
+ strncat(buf2, EXTCERT(Public), 5);
pc->cname = cpystr(buf2);
/* Try to load the key with an empty password */