diff options
author | Tim Burke <tim.burke@gmail.com> | 2017-07-13 16:54:20 -0700 |
---|---|---|
committer | Tim Burke <tim.burke@gmail.com> | 2017-09-13 20:46:19 +0000 |
commit | cf12c9ca26e4388e383f1aa3c1558d61eda96777 (patch) | |
tree | f10d678de7dedc73b675dac246a75833cb4e1917 /src/builtin/xor_codes/xor_hd_code.c | |
parent | 737843e14e7b29b122b7a55b1c1ab777bf83464f (diff) | |
download | liberasurecode-cf12c9ca26e4388e383f1aa3c1558d61eda96777.tar.gz |
flat_xor_hd: better validate args
Previously, we'd segfault with args like k=1, m=3, hd=3.
Change-Id: I8a1d92f388c54fe4f5b357eaf85a27e6b334df11
Diffstat (limited to 'src/builtin/xor_codes/xor_hd_code.c')
-rw-r--r-- | src/builtin/xor_codes/xor_hd_code.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/builtin/xor_codes/xor_hd_code.c b/src/builtin/xor_codes/xor_hd_code.c index 5c4d052..9e41ad1 100644 --- a/src/builtin/xor_codes/xor_hd_code.c +++ b/src/builtin/xor_codes/xor_hd_code.c @@ -664,7 +664,7 @@ xor_code_t* init_xor_hd_code(int k, int m, int hd) if (k <= 10 && k >= 5) { is_valid = 1; } - } else if (m == 3) { + } else if (m == 3 && k == 3) { is_valid = 1; } } |