]> git.ipfire.org Git - thirdparty/zstd.git/commit
Fix for `zstd` CLI accepts bogus values for numeric parameters (#3268)
authorctkhanhly <ctkhanhly@gmail.com>
Wed, 21 Sep 2022 20:20:01 +0000 (13:20 -0700)
committerGitHub <noreply@github.com>
Wed, 21 Sep 2022 20:20:01 +0000 (13:20 -0700)
commit358787764f140d035b56863a9e2c20a3c5f0f7d9
treebc248dafdc00db78efd80a2414af2ba88948c7df
parent1c04514b31a44dcf44724ffbb1dc658aee39cd0b
Fix for `zstd` CLI accepts bogus values for numeric parameters (#3268)

* add checks to mal-formed numeric values for memory and memlimit parameters

Signed-off-by: Ly Cao <lycao@fb.com>
* changed errorMsg to a literal string instead of static string in main

* moved bogus numeric error to NEXT_UINT32 + add macro NEXT_TSIZE

Signed-off-by: Ly Cao <lycao@fb.com>
Signed-off-by: Ly Cao <lycao@fb.com>
Co-authored-by: Ly Cao <lycao@fb.com>
programs/zstdcli.c
tests/cli-tests/basic/memlimit.sh [new file with mode: 0755]
tests/cli-tests/basic/memlimit.sh.stderr.exact [new file with mode: 0644]
tests/cli-tests/basic/memlimit.sh.stdout.exact [new file with mode: 0644]