Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo in blog code #1

Open
meling opened this issue Apr 2, 2022 · 1 comment
Open

Typo in blog code #1

meling opened this issue Apr 2, 2022 · 1 comment

Comments

@meling
Copy link

meling commented Apr 2, 2022

First off, thanks for a great blog about fuzzing. I didn't download the code, but instead copy-pasted from the blog's code snippets and came across this typo below that had me debugging the code for a while. The clue is of course in the comment, but I didn't notice until I printed the strSuffix which was the whole string and not a suffix...

	// If we modified characters [0:n], then characters [n:] should stay the same
	resultSuffix := string([]rune(result)[n:])
	strSuffix := string([]rune(str)[:])

The code in the code base is correct though:

	resultSuffix := string([]rune(result)[count:])
	strSuffix := string([]rune(str)[count:])

Anyway, I thought you might want to fix the typo in the blog.

@everestmz
Copy link
Member

Thank you for pointing this out! I'll fix that up. Glad you enjoyed the post 😄

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

No branches or pull requests

2 participants