dblotsky / stringfuzz

Fuzzer and generator for string and regex problems in SMT-LIB 2.x format.
Other
20 stars 9 forks source link

stringfuzzx fuzz: should not produce negative numbers #11

Closed FedericoAureliano closed 6 years ago

FedericoAureliano commented 6 years ago

Line 34 in fuzz.py can produce negative numbers.

literal.value = random.randint(-literal.value, literal.value)

It was intended to be:

literal.value += random.randint(-literal.value, literal.value)

@dblotsky do you mind if I fix it and push straight to master?

dblotsky commented 6 years ago

@FedericoAureliano I'm cool if you want to fix it. Please do make a PR though, because I'd just like to see the solution. Is that ok? Feel free to use it right away before the PR is merged. That's what I did with the equality generator.

FedericoAureliano commented 6 years ago

Sounds good, I'll do same (make a PR) for the other two issues I'm submitting now.

FedericoAureliano commented 6 years ago

We're actually fine with it producing negative numbers