Skip to content

Instantly share code, notes, and snippets.

@VOID001
Created July 29, 2015 16:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VOID001/7947fa96f67161030900 to your computer and use it in GitHub Desktop.
Save VOID001/7947fa96f67161030900 to your computer and use it in GitHub Desktop.
  • BUG Replay Successful
  • Locate bug on function convert_links_in_hashtable
  • When exec wget -k www.baidu.com (CRASH) The structure "downloaded_html_set" looks like this:
$16 = {
	hash_function = 0x40ddac <hash_string>,
	test_function = 0x40df70 <cmp_string>,
	cells = 0x20127c30,
	size = 13,
	count = 1,
	resize_threshold = 9,
	prime_offset = 1
}
  • When exec wget baidu.com (DO NOT CRASH)

The structure "downloaded_html_set" looks like this

$17 = {
	hash_function = 0x40ddac <hash_string>,
	test_function = 0x40df70 <cmp_string>,
	cells = 0x20044dc8,			//ONLY DIFFRENCE HERE
	size = 13,
	count = 1,
	resize_threshold = 9,
	prime_offset = 1
}

breakpoint at 1761 convert_all_links()

SegmentFault On convert__all_links()->convert_links_in_hashtable()->convert_links()->fwrite

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