Endava / cats

CATS is a REST API Fuzzer and negative testing tool for OpenAPI endpoints. CATS automatically generates, runs and reports tests with minimum configuration and no coding effort. Tests are self-healing and do not require maintenance.
Apache License 2.0
1.14k stars 73 forks source link

CATS tool crashes if string maxLegth is 2147483647 (7FFFFFFF) #135

Closed ganeshnikam18 closed 1 week ago

ganeshnikam18 commented 1 month ago

Describe the bug CATS tool crashes if string maxLegth is 2147483647 (7FFFFFFF)

CATS Version: 11.7.1

To Reproduce Steps to reproduce the behaviour:

  1. Take any contract where string field is defined with maxLength = 2147483647 (7FFFFFFF)
  2. Run the CATS tool for MaxLengthExactValueInStringFieldFuzzer
  3. CATS tool will crash

Expected behaviour CATS tool should not crash

Root Cause Screenshot 2024-08-03 003504

  1. The code in the attached image is root cause of the crash
  2. Here we are adding 15 in the maxLength value which make it negative number
  3. When it goes for string generation with negative length value, it crashes

What is the fix You have already added the fix on 20th June for this issue. Here is the commit ID: https://github.com/Endava/cats/commit/95a559d2ab2b2e893e0033a3b8bb63497af5e001

@en-milie can you please create new release tag ?

en-milie commented 1 month ago

This should be fixed in 11.8.0. Can you please check if it's still reproducible with latest release? @ganeshnikam18

en-milie commented 2 weeks ago

@ganeshnikam18 Can I close this one?

ganeshnikam18 commented 2 weeks ago

@en-milie Yes, you can close this