From cf12c9ca26e4388e383f1aa3c1558d61eda96777 Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Thu, 13 Jul 2017 16:54:20 -0700 Subject: flat_xor_hd: better validate args Previously, we'd segfault with args like k=1, m=3, hd=3. Change-Id: I8a1d92f388c54fe4f5b357eaf85a27e6b334df11 --- src/builtin/xor_codes/xor_hd_code.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; } } -- cgit v1.2.1