summaryrefslogtreecommitdiff
path: root/pith/smime.c
diff options
context:
space:
mode:
Diffstat (limited to 'pith/smime.c')
-rw-r--r--pith/smime.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pith/smime.c b/pith/smime.c
index 9d588479..469a381e 100644
--- a/pith/smime.c
+++ b/pith/smime.c
@@ -1113,7 +1113,9 @@ rfc822_output_func(void *b, char *string)
{
BIO *bio = (BIO *) b;
- return((BIO_puts(bio, string) > 0) ? 1L : 0L);
+ return(string ? *string ? (BIO_puts(bio, string) > 0 ? 1L : 0L)
+ : (BIO_puts(bio, string) >= 0 ? 1L : 0L)
+ : 0L);
}