Skip to content

Parse header attributes without splitting the value into single characters - #633

Open
patrickweh wants to merge 1 commit into
Webklex:masterfrom
Team-Nifty-GmbH:fix/read-attribute-memory
Open

patrickweh wants to merge 1 commit into
Webklex:masterfrom
Team-Nifty-GmbH:fix/read-attribute-memory

Conversation

@patrickweh

Copy link
Copy Markdown

Header::read_attribute() split the attribute value into an array of single characters. A header value of a few megabytes that contains ; and = (e.g. a long recipient list) allocated one array element per byte and exhausted a 512 MB memory limit while fetching the headers. The value is now walked by index, which keeps the parsing result the same and the memory flat.

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