Skip to content

Fix bug in cookie comparison - #172

Closed
greenrd wants to merge 4 commits into
xroche:masterfrom
greenrd:master
Closed

greenrd wants to merge 4 commits into
xroche:masterfrom
greenrd:master

Conversation

@greenrd

@greenrd greenrd commented Jun 10, 2018

Copy link
Copy Markdown

Fixes #171

@mingodad

Copy link
Copy Markdown

Good catch of the cookie comparison !

@hbina

hbina commented Jul 26, 2019

Copy link
Copy Markdown

2 years later...is this project ded?

@Neustradamus

Copy link
Copy Markdown

@xroche: Have you seen this PR?

It is linked to:

@xroche

xroche commented Jun 9, 2026

Copy link
Copy Markdown
Owner

The bug is real (unsigned loop in cookie_cmp_wildcard_domain, src/htsbauth.c) and your fix is right. The PR itself can't merge because it carries 8-year-old regenerated build files, so I applied the one-line fix directly in #317, with credit to you. Closing, and sorry for the long delay.

@xroche xroche closed this Jun 9, 2026
timothybrush pushed a commit to timothybrush/httrack that referenced this pull request Jun 9, 2026
cookie_cmp_wildcard_domain used an unsigned loop counter, so i >= 0 was always
true (infinite loop and out-of-bounds reads) and an empty domain underflowed
l - 1. Use a signed counter. Found and fixed by greenrd in xroche#172. closes xroche#171
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.

cookie_cmp_wildcard_domain never matches

5 participants