From 8c97a4695eb5bf8be446cd5b73acb528b2ed5afe Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Wed, 7 Mar 2018 10:24:09 +0900 Subject: [PATCH] allow callout type ONIG_CALLOUT_TYPE_SINGLE only --- src/regparse.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/regparse.c b/src/regparse.c index 39316ba..43f2bb6 100644 --- a/src/regparse.c +++ b/src/regparse.c @@ -1502,6 +1502,9 @@ onig_set_callout_of_name(OnigEncoding enc, OnigCalloutType callout_type, CalloutNameEntry* e; CalloutNameListEntry* fe; + if (callout_type != ONIG_CALLOUT_TYPE_SINGLE) + return ONIGERR_INVALID_ARGUMENT; + if (arg_num < 0 || arg_num > ONIG_CALLOUT_MAX_ARGS_NUM) return ONIGERR_INVALID_CALLOUT_ARG; -- 2.40.0