diff options
Diffstat (limited to 'sm/base64.c')
-rw-r--r-- | sm/base64.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sm/base64.c b/sm/base64.c index bf1aea179..e7a1ae9ae 100644 --- a/sm/base64.c +++ b/sm/base64.c @@ -224,8 +224,9 @@ base64_reader_cb (void *cb_value, char *buffer, size_t count, size_t *nread) parm->linelen = parm->readpos = 0; } else if ( parm->have_lf && parm->line_counter == 1 - && !strncmp (parm->line, "Content-Type:", 13)) - { /* Might be a S/MIME body */ + && parm->linelen >= 13 + && !ascii_memcasecmp (parm->line, "Content-Type:", 13)) + { /* might be a S/MIME body */ parm->might_be_smime = 1; parm->linelen = parm->readpos = 0; goto next; |