Skip to content

fts: build-mail - Bound content_type_params copy by parser end#288

Open
rootvector2 wants to merge 1 commit into
dovecot:mainfrom
rootvector2:fts-build-mail-params-oob
Open

fts: build-mail - Bound content_type_params copy by parser end#288
rootvector2 wants to merge 1 commit into
dovecot:mainfrom
rootvector2:fts-build-mail-params-oob

Conversation

@rootvector2
Copy link
Copy Markdown
Contributor

fts_build_parse_content_type() captures the params remainder with
i_strdup(parser.data), but parser.data points into hdr->full_value,
which is a (data, len) buffer, not a C string. message-header-parser
reuses value_buf across calls via buffer_set_used_size(0), so bytes
past full_value_len can be leftover from a previous header value.
Switch to i_strndup with parser.end - parser.data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant