Skip to content
This repository was archived by the owner on Apr 2, 2019. It is now read-only.
This repository was archived by the owner on Apr 2, 2019. It is now read-only.

no bounds checks in find null in string1.go #29

@yuval-k

Description

@yuval-k

I had a crash on due bounds not being checked in string1.go

to fix it i had to change the loop in findnull()

from this:

    for p[l] != 0 {
            l++
    }

to this:

    for l < len(p) && p[l] != 0 {
            l++
    }
    if l == len(p) {
      return 0
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions