Skip to content

fileio: clamp value of windowLog in patch-mode#2637

Merged
senhuang42 merged 1 commit intofacebook:devfrom
occivink:clamp-windowlog-in-patchmode
May 12, 2021
Merged

fileio: clamp value of windowLog in patch-mode#2637
senhuang42 merged 1 commit intofacebook:devfrom
occivink:clamp-windowlog-in-patchmode

Conversation

@occivink
Copy link
Contributor

With small enough input files, the inferred value of fileWindowLog could
be smaller than ZSTD_WINDOWLOG_MIN.

This can be reproduced like so:
$ echo abc > small
$ echo abcdef > small2
$ zstd --patch-from small small2 -o patch
previously, this would fail with the error "zstd: error 11 : Parameter is out of bound"

With small enough input files, the inferred value of fileWindowLog could
be smaller than ZSTD_WINDOWLOG_MIN.

This can be reproduced like so:
$ echo abc > small
$ echo abcdef > small2
$ zstd --patch-from small small2 -o patch
previously, this would fail with the error "zstd: error 11 : Parameter is out of bound"
Copy link

@senhuang42 senhuang42 left a comment

Choose a reason for hiding this comment

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

Thanks for the fix @occivink !

@senhuang42 senhuang42 merged commit d4548c9 into facebook:dev May 12, 2021
@occivink occivink deleted the clamp-windowlog-in-patchmode branch May 12, 2021 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants