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

clp-s: Incorrect parsing of string values when followed by a number of spaces. #297

Closed
wraymo opened this issue Feb 22, 2024 · 0 comments
Closed
Labels
bug Something isn't working

Comments

@wraymo
Copy link
Contributor

wraymo commented Feb 22, 2024

Bug

Currently, clp-s uses raw_json_token().substr(1, raw_json_token().size()-2) to get unescaped string values. But according to the official docs, a string token always begins with a " and is always terminated by the final ", possibly followed by a number of spaces. A string may not be correctly parsed if it is followed by spaces.

CLP version

7d9550a

Environment

macOS 13.2.1

Reproduction steps

  • Compress a file with a log message {"a": "clp string" }
  • Decompress the archive. The log message becomes {"a": "clp string""}
@wraymo wraymo added the bug Something isn't working label Feb 22, 2024
@wraymo wraymo changed the title clp-s: Incorrect string value parsing when followed by a number of spaces. clp-s: Incorrect parsing of string values when followed by a number of spaces. Feb 22, 2024
@wraymo wraymo closed this as completed in af6580a Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant