From 57888634921b61a828f9b98632b8a450bd6445f2 Mon Sep 17 00:00:00 2001 From: J08nY Date: Mon, 9 Jul 2018 21:25:11 +0200 Subject: Do not leak memory in hex check. --- src/gen/hex.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gen/hex.c b/src/gen/hex.c index c91f522..58250a0 100644 --- a/src/gen/hex.c +++ b/src/gen/hex.c @@ -109,9 +109,8 @@ CHECK(hex_check_param) { int result = OFFSET_FIELD - state; for (offset_e i = OFFSET_SEED; i < OFFSET_END; ++i) { if (params[i]) { - if (strstr(params[i], search_hex)) { + if (result != 1 && strstr(params[i], search_hex)) { result = 1; - break; } if (pari[i]) { pari_free(params[i]); -- cgit v1.2.3-70-g09d2