Skip to content

Typo in blog code #1

Open
Open
@meling

Description

@meling

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions