]> granicus.if.org Git - onig/commitdiff
allow callout type ONIG_CALLOUT_TYPE_SINGLE only
authorK.Kosako <kosako@sofnec.co.jp>
Wed, 7 Mar 2018 01:24:09 +0000 (10:24 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Wed, 7 Mar 2018 01:24:09 +0000 (10:24 +0900)
src/regparse.c

index 39316ba321db6810bbbc95a98df40d6080601485..43f2bb618a25c3c1d8e4a58c7ccc1c517c21636f 100644 (file)
@@ -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;