Skip to content

Fix leak and crash in ares_parse_a/aaaa_reply#264

Merged
bradh352 merged 3 commits intoc-ares:masterfrom
ki11roy:fix_leak
Jun 24, 2019
Merged

Fix leak and crash in ares_parse_a/aaaa_reply#264
bradh352 merged 3 commits intoc-ares:masterfrom
ki11roy:fix_leak

Conversation

@ki11roy
Copy link
Copy Markdown
Contributor

@ki11roy ki11roy commented Jun 24, 2019

Fixes leak and crash in ares_parse_a/aaaa_reply. Borrowed fuzz files from #263.

@bradh352 By the way, I thought of moving common code somewhere in ares_parse_a_aaaa_reply.inc and including it into ares_parse_a_reply.c directly, what do you think of that?

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.009%) to 89.61% when pulling 095c006 on ki11roy:fix_leak into 5dd3629 on c-ares:master.

@bradh352
Copy link
Copy Markdown
Member

I agree they're quite common. I don't know what you mean by a .inc file, but you could definitely probably combine the functionality into a single conversion function, with a one-liner wrapper that is the parse_a/aaaa_reply.

@bradh352 bradh352 merged commit b949cc3 into c-ares:master Jun 24, 2019
vadorovsky pushed a commit to vadorovsky/c-ares that referenced this pull request Nov 1, 2019
* fix leak if naddress of particular type found
* fix segfault when wanted ttls count lesser than count of result records
* add fuzzer input files that trigger problems (from c-ares#263)

Reported-By: David Drysdale (@daviddrysdale)
Fix-By: Andrew Selivanov (@ki11roy)
DronRathore pushed a commit to DronRathore/c-ares that referenced this pull request Mar 11, 2020
* fix leak if naddress of particular type found
* fix segfault when wanted ttls count lesser than count of result records
* add fuzzer input files that trigger problems (from c-ares#263)

Reported-By: David Drysdale (@daviddrysdale)
Fix-By: Andrew Selivanov (@ki11roy)
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.

3 participants