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-core: Replace calls to incomplete UTF-8 validation function with new and complete implementation. #477

Merged
merged 2 commits into from
Jul 11, 2024

Conversation

LinZhihao-723
Copy link
Member

Description

This PR:

  1. Replace the UTF-8 buffer validation with dedicated methods introduced in PR Add support for validating and escaping UTF-8 strings. #453
  2. Remove UTF-8 validation helpers in the current clp/utils as it doesn't validate UTF-8 code point ranges.

Validation performed

  1. Add three files into a directory: one valid raw log file, one valid zstd compressed IR file, and clp binary. Compress the archive using clp and ensure raw log and IR can be properly compressed, but not clp binary.
  2. Repeat step 1 by first compressing the directory using zip to trigger libarchive reading path. Ensure the raw log can be properly compressed (but not IR, since libarchive reader will not recursively decompress the zstd compressed IR stream)
  3. Ensure workflow passed

Copy link
Contributor

@haiqi96 haiqi96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a simple change and looks good to me

Copy link
Member

@kirkrodrigues kirkrodrigues left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the PR title, how about:

clp-core: Replace calls to incomplete UTF-8 validation function with new and complete implementation.

@LinZhihao-723
Copy link
Member Author

For the PR title, how about:

clp-core: Replace calls to incomplete UTF-8 validation function with new and complete implementation.

LGTM

@LinZhihao-723 LinZhihao-723 changed the title clp: Replace UTF-8 validation by the latest UTF-8 utilities. clp-core: Replace calls to incomplete UTF-8 validation function with new and complete implementation. Jul 11, 2024
@LinZhihao-723 LinZhihao-723 merged commit 437607a into y-scope:main Jul 11, 2024
13 checks passed
jackluo923 pushed a commit to jackluo923/clp that referenced this pull request Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants