From d77dbaa7d700d2b3d5b93d605ac047b04d062ad4 Mon Sep 17 00:00:00 2001 From: Dmitry Belyavskiy Date: Sat, 21 Sep 2019 16:37:32 +0300 Subject: [PATCH] Fix OOB read. CID 253274 --- gost_ctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gost_ctl.c b/gost_ctl.c index 2dfb29a..64b76ad 100644 --- a/gost_ctl.c +++ b/gost_ctl.c @@ -76,7 +76,7 @@ const char *get_gost_engine_param(int param) int gost_set_default_param(int param, const char *value) { const char *tmp; - if (param < 0 || param > GOST_PARAM_MAX) + if (param < 0 || param >= GOST_PARAM_MAX) return 0; tmp = getenv(gost_envnames[param]); -- 2.39.5