From: K.Kosako Date: Wed, 7 Mar 2018 01:24:09 +0000 (+0900) Subject: allow callout type ONIG_CALLOUT_TYPE_SINGLE only X-Git-Tag: v6.8.0~56 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8c97a4695eb5bf8be446cd5b73acb528b2ed5afe;p=onig allow callout type ONIG_CALLOUT_TYPE_SINGLE only --- 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;