Skip to content

hsts: explicitly skip blank lines - #13603

Closed
danielgustafsson wants to merge 1 commit into
curl:masterfrom
danielgustafsson:dg-hsts-emptyline
Closed

hsts: explicitly skip blank lines#13603
danielgustafsson wants to merge 1 commit into
curl:masterfrom
danielgustafsson:dg-hsts-emptyline

Conversation

@danielgustafsson

Copy link
Copy Markdown
Member

Keep blank lines or lines containing only whitespace to make it all the way to the more expensive sscanf call in hsts_add.

Comment thread lib/hsts.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since Curl_get_line() works hard to return lines with a trailing newline, should this perhaps rather check for <= 1 ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point, it should. Rebased the PR with this fix.

Keep blank lines or lines containing only whitespace to make it all
the way to the more expensive sscanf call in hsts_add.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants