summaryrefslogtreecommitdiff
path: root/pith
diff options
context:
space:
mode:
Diffstat (limited to 'pith')
-rw-r--r--pith/filter.c18
-rw-r--r--pith/osdep/pipe.c2
-rw-r--r--pith/pine.hlp23
-rw-r--r--pith/smime.c3
4 files changed, 38 insertions, 8 deletions
diff --git a/pith/filter.c b/pith/filter.c
index 69413bf4..70a89f17 100644
--- a/pith/filter.c
+++ b/pith/filter.c
@@ -7743,6 +7743,9 @@ html_element_output(FILTER_S *f, int ch)
html_output(f, ch);
}
+#define ISHEX_DIGIT(X) (isdigit((X)) || \
+ ((X) >= 'a' && (X) <= 'f') || \
+ ((X) >= 'A' && (X) <= 'F'))
/*
* collect html entity and return its UCS value when done.
@@ -7772,6 +7775,9 @@ html_entity_collector(FILTER_S *f, int ch, UCS *ucs, char **alt)
else if((len == 0)
? (isalpha((unsigned char) ch) || ch == '#')
: ((isdigit((unsigned char) ch)
+ || (len == 1 && (unsigned char) ch == 'x')
+ || (len == 1 &&(unsigned char) ch == 'X')
+ || (len > 1 && isxdigit((unsigned char) ch))
|| (isalpha((unsigned char) ch) && buf[0] != '#')))){
buf[len++] = ch;
return(HTML_MOREDATA);
@@ -7779,14 +7785,18 @@ html_entity_collector(FILTER_S *f, int ch, UCS *ucs, char **alt)
else if(ch == ';' || ASCII_ISSPACE((unsigned char) ch)){
buf[len] = '\0'; /* got something! */
if(buf[0] == '#'){
- *ucs = (UCS) strtoul(&buf[1], NULL, 10);
+ if(buf[1] == 'x' || buf[1] == 'X')
+ *ucs = (UCS) strtoul(&buf[2], NULL, 16);
+ else
+ *ucs = (UCS) strtoul(&buf[1], NULL, 10);
+
if(alt){
*alt = NULL;
for(i = 0; i < sizeof(entity_tab)/sizeof(struct html_entities); i++)
- if(entity_tab[i].value == *ucs){
- *alt = entity_tab[i].plain;
+ if(entity_tab[i].value == *ucs){
+ *alt = entity_tab[i].plain;
break;
- }
+ }
}
len = 0;
diff --git a/pith/osdep/pipe.c b/pith/osdep/pipe.c
index 56c4a239..ed9eda0e 100644
--- a/pith/osdep/pipe.c
+++ b/pith/osdep/pipe.c
@@ -741,7 +741,7 @@ process_reap(pid_t pid, int *esp, int flags)
wflags |= WNOHANG;
#endif
- while (((rv = waitpid(pid, &wstatus, wflags)) < 0) && (errno != ECHILD));
+ while (((rv = waitpid(pid, &wstatus, wflags)) < 0) && (errno != ECHILD));
#elif HAVE_WAIT4
diff --git a/pith/pine.hlp b/pith/pine.hlp
index 4b0acfeb..31e20a0a 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 69 2015-02-28 15:59:49
+Alpine Commit 70 2015-03-15 22:39:47
============= h_news =================
<HTML>
<HEAD>
@@ -186,6 +186,22 @@ Additions include:
<LI> When Alpine sends an attachment, it will set the boundary attribute
in lower case, as some SMTP servers, such as those of libero.it
reject messages if the boundary attribute is in uppercase.
+ <LI> SMIME: The ^E command that gives infromation on the certificate
+ is only available for messages that have a signed or encrypted
+ part.
+
+ <LI> SMIME: If a message contains a RFC822 atachment that is
+ signed/decrypted add the ability to view its SMIME information.
+
+ <LI> HTML: Add support for decoding entities in hexadecimal notation.
+ Suggested by Tulip&aacute;nt Gergely.
+
+ <LI> Pico: Add the ability to search for strings in the beginning or end
+ of a line. In the search menu, pressing Ctrl-^ toggles the prompt
+ to search for a string at the beginning of a line. Another press of
+ Ctrl-^ toggles the prompt to search for a string at the end of a
+ line, and pressing Ctrl-^ one more time searches for the string
+ anywhere in the text.
</UL>
<P>
@@ -195,6 +211,11 @@ Bugs that have been addressed include:
a RFC822 attached message. Reported by Holger Trapp and Bj&ouml;rn
Krellner.
+ <LI> Fix vulnerability in regex library. This only affects those who use
+ this library, such as the windows version of Alpine. See
+ <A HREF="http://www.kb.cert.org/vuls/id/695940">http://www.kb.cert.org/vuls/id/695940</A>
+ for more details.
+
<LI> Alpine would not set include and lib paths for OpenSSL if this was
installed in /usr/local/ssl.
diff --git a/pith/smime.c b/pith/smime.c
index 3482e045..99c80c03 100644
--- a/pith/smime.c
+++ b/pith/smime.c
@@ -560,18 +560,17 @@ load_pkey_with_prompt(char *fpath, char *text, char *prompt)
in = text ? BIO_new_mem_buf(text, strlen(text)) : BIO_new_file(fpath, "r");
if(in != NULL){
pkey = PEM_read_bio_PrivateKey(in, NULL, NULL, "");
- BIO_free(in);
if(pkey != NULL) return pkey;
}
if(pith_smime_enter_password)
while(pkey == NULL && rc != 1){
- in = text ? BIO_new_mem_buf(text, strlen(text)) : BIO_new_file(fpath, "r");
if(in != NULL){
do {
rc = (*pith_smime_enter_password)(prompt, (char *)pass, sizeof(pass));
} while (rc!=0 && rc!=1 && rc>0);
+ (void) BIO_reset(in);
pkey = PEM_read_bio_PrivateKey(in, NULL, NULL, (char *)pass);
BIO_free(in);
}