Mercurial > dovecot > core-2.2
changeset 13203:04d35b8bc764
fts: Don't crash if application/octet-stream attachment doesn't have filename.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 10 Aug 2011 14:56:00 +0300 |
parents | 0cc1cd6f9406 |
children | e2c6a2535b55 |
files | src/plugins/fts/fts-parser-script.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/fts/fts-parser-script.c Wed Aug 10 14:50:56 2011 +0300 +++ b/src/plugins/fts/fts-parser-script.c Wed Aug 10 14:56:00 2011 +0300 @@ -123,7 +123,10 @@ return FALSE; } - if (strcmp(*content_type, "application/octet-stream") == 0) { + if (strcmp(*content_type, "application/octet-stream") != 0) { + if (extension == NULL) + return FALSE; + array_foreach(&suser->content, content) { if (content->extensions != NULL && str_array_icase_find(content->extensions, extension)) {