]> granicus.if.org Git - onig/log
onig
7 years agoadd test cases for backref checker
K.Kosako [Tue, 4 Jul 2017 05:48:06 +0000 (14:48 +0900)]
add test cases for backref checker

7 years agofix parsing for relative backref checker
K.Kosako [Tue, 4 Jul 2017 05:45:35 +0000 (14:45 +0900)]
fix parsing for relative backref checker

7 years agoimplement backref checker compile process
K.Kosako [Tue, 4 Jul 2017 05:12:58 +0000 (14:12 +0900)]
implement backref checker compile process

7 years agoimplement print_compiled_byte_code_list() for OP_BACKREF_CHECK and OP_BACKREF_CHECK_W...
K.Kosako [Tue, 4 Jul 2017 04:35:17 +0000 (13:35 +0900)]
implement print_compiled_byte_code_list() for OP_BACKREF_CHECK and OP_BACKREF_CHECK_WITH_LEVEL

7 years agorename bref to backref
K.Kosako [Tue, 4 Jul 2017 01:36:01 +0000 (10:36 +0900)]
rename bref to backref

7 years agofix indent
K.Kosako [Tue, 4 Jul 2017 01:30:24 +0000 (10:30 +0900)]
fix indent

7 years agoadd OP_BACKREF_CHECK and OP_BACKREF_CHECK_WITH_LEVEL
K.Kosako [Tue, 4 Jul 2017 01:26:59 +0000 (10:26 +0900)]
add OP_BACKREF_CHECK and OP_BACKREF_CHECK_WITH_LEVEL

7 years agoadd parsing of backref checker or if-else notation
K.Kosako [Mon, 3 Jul 2017 08:36:02 +0000 (17:36 +0900)]
add parsing of backref checker or if-else notation

7 years agoupdate README.md v6.4.0
K.Kosako [Mon, 3 Jul 2017 00:59:56 +0000 (09:59 +0900)]
update README.md

7 years agomerge from develop
K.Kosako [Mon, 3 Jul 2017 00:52:02 +0000 (09:52 +0900)]
merge from develop

7 years agoadd IGNORE_EUC_JP for #63
K.Kosako [Mon, 3 Jul 2017 00:18:59 +0000 (09:18 +0900)]
add IGNORE_EUC_JP for #63

7 years agoupdate HISTORY
K.Kosako [Fri, 30 Jun 2017 05:06:28 +0000 (14:06 +0900)]
update HISTORY

7 years agosetup 6.4.0
K.Kosako [Fri, 30 Jun 2017 05:03:56 +0000 (14:03 +0900)]
setup 6.4.0

7 years agoupdate HISTORY
K.Kosako [Fri, 30 Jun 2017 04:57:21 +0000 (13:57 +0900)]
update HISTORY

7 years agorefactoring
K.Kosako [Fri, 30 Jun 2017 03:34:46 +0000 (12:34 +0900)]
refactoring

7 years agofix backref number == 0 case
K.Kosako [Fri, 30 Jun 2017 02:17:11 +0000 (11:17 +0900)]
fix backref number == 0 case

7 years agofix memory leaks
K.Kosako [Fri, 30 Jun 2017 01:25:31 +0000 (10:25 +0900)]
fix memory leaks

7 years agoremove BBUF_ENSURE_SIZE_FREE_ON_ERROR()
K.Kosako [Thu, 29 Jun 2017 09:05:25 +0000 (18:05 +0900)]
remove BBUF_ENSURE_SIZE_FREE_ON_ERROR()

7 years agoremove NCCLAS_SHARE codes
K.Kosako [Thu, 29 Jun 2017 08:45:51 +0000 (17:45 +0900)]
remove NCCLAS_SHARE codes

7 years agoadd NST_BACKREF flag
K.Kosako [Thu, 29 Jun 2017 07:13:38 +0000 (16:13 +0900)]
add NST_BACKREF flag

7 years agofix memory leaks
K.Kosako [Thu, 29 Jun 2017 06:28:30 +0000 (15:28 +0900)]
fix memory leaks

7 years agorefactoring
K.Kosako [Thu, 29 Jun 2017 05:46:17 +0000 (14:46 +0900)]
refactoring

7 years agofix a memory leak
K.Kosako [Thu, 29 Jun 2017 05:27:49 +0000 (14:27 +0900)]
fix a memory leak

7 years agoreduce code
K.Kosako [Thu, 29 Jun 2017 05:27:12 +0000 (14:27 +0900)]
reduce code

7 years agochange encoding from EUC-JP to UTF-8 in doc/XXX.ja
K.Kosako [Wed, 28 Jun 2017 06:35:17 +0000 (15:35 +0900)]
change encoding from EUC-JP to UTF-8 in doc/XXX.ja

7 years agoupdate doc/RE.ja
K.Kosako [Wed, 28 Jun 2017 06:31:15 +0000 (15:31 +0900)]
update doc/RE.ja

7 years agorefactoring
K.Kosako [Wed, 28 Jun 2017 06:26:41 +0000 (15:26 +0900)]
refactoring

7 years agocheck 0 in ME_STATUS_ON_AT()
K.Kosako [Wed, 28 Jun 2017 06:23:42 +0000 (15:23 +0900)]
check 0 in ME_STATUS_ON_AT()

7 years agodefine MEM_STATUS_AT0()
K.Kosako [Wed, 28 Jun 2017 05:37:19 +0000 (14:37 +0900)]
define MEM_STATUS_AT0()

7 years agorefactoring
K.Kosako [Wed, 28 Jun 2017 05:25:49 +0000 (14:25 +0900)]
refactoring

7 years agorename NQ_BODY_XXXX
K.Kosako [Wed, 28 Jun 2017 04:43:56 +0000 (13:43 +0900)]
rename NQ_BODY_XXXX

7 years agoupdate doc/RE
K.Kosako [Wed, 28 Jun 2017 04:25:35 +0000 (13:25 +0900)]
update doc/RE

7 years agorename member
K.Kosako [Wed, 28 Jun 2017 04:21:28 +0000 (13:21 +0900)]
rename member

7 years agochange compile code for zero
K.Kosako [Wed, 28 Jun 2017 04:17:40 +0000 (13:17 +0900)]
change compile code for zero

7 years agodefine compile_enclosure_memory_node()
K.Kosako [Wed, 28 Jun 2017 02:23:33 +0000 (11:23 +0900)]
define compile_enclosure_memory_node()

7 years agoadd test cases
K.Kosako [Wed, 28 Jun 2017 02:13:17 +0000 (11:13 +0900)]
add test cases

7 years agorefactoring
K.Kosako [Wed, 28 Jun 2017 01:53:17 +0000 (10:53 +0900)]
refactoring

7 years agorename symbol
K.Kosako [Wed, 28 Jun 2017 01:34:53 +0000 (10:34 +0900)]
rename symbol

7 years agoenclose by USE_MONOMANIAC_CHECK_CAPTURES_IN_ENDLESS_REPEAT
K.Kosako [Wed, 28 Jun 2017 01:28:57 +0000 (10:28 +0900)]
enclose by USE_MONOMANIAC_CHECK_CAPTURES_IN_ENDLESS_REPEAT

7 years agofix STACK_EMPTY_CHECK_REC()
K.Kosako [Wed, 28 Jun 2017 01:20:58 +0000 (10:20 +0900)]
fix STACK_EMPTY_CHECK_REC()

7 years agouse HAVE_INTTYPES_H
K.Kosako [Mon, 26 Jun 2017 07:51:03 +0000 (16:51 +0900)]
use HAVE_INTTYPES_H

7 years agofix type OnigStackIndex to intptr_t for Windows platoform
K.Kosako [Mon, 26 Jun 2017 07:29:10 +0000 (16:29 +0900)]
fix type OnigStackIndex to intptr_t for Windows platoform

7 years agoenclose ifdef USE_SUBEXP_CALL
K.Kosako [Mon, 26 Jun 2017 06:17:09 +0000 (15:17 +0900)]
enclose ifdef USE_SUBEXP_CALL

7 years agoPR #62 check malloc, realloc and alloca return value
K.Kosako [Mon, 26 Jun 2017 04:13:20 +0000 (13:13 +0900)]
PR #62 check malloc, realloc and alloca return value

7 years agoPR #62 check xmalloc return value before using it
K.Kosako [Mon, 26 Jun 2017 04:02:46 +0000 (13:02 +0900)]
PR #62 check xmalloc return value before using it

7 years agoPR #62 check alloc return value
K.Kosako [Mon, 26 Jun 2017 03:55:46 +0000 (12:55 +0900)]
PR #62 check alloc return value

7 years agofix indent
K.Kosako [Mon, 26 Jun 2017 03:53:19 +0000 (12:53 +0900)]
fix indent

7 years agoPR #62 check malloc return value
K.Kosako [Mon, 26 Jun 2017 02:21:25 +0000 (11:21 +0900)]
PR #62 check malloc return value

7 years agoPR #62 unicode: use OnigCtype in onigenc_unicode_ctype_code_range argument
K.Kosako [Mon, 26 Jun 2017 02:18:53 +0000 (11:18 +0900)]
PR #62 unicode: use OnigCtype in onigenc_unicode_ctype_code_range argument

7 years agoMerge pull request #62 from efiop/veracode
K.Kosako [Sat, 24 Jun 2017 08:39:40 +0000 (17:39 +0900)]
Merge pull request #62 from efiop/veracode

Fix issues reported by Veracode

7 years agoregexec: check xmalloc and xalloca return value
Ruslan Kuprieiev [Thu, 15 Jun 2017 21:15:31 +0000 (00:15 +0300)]
regexec: check xmalloc and xalloca return value

"Unchecked return value of 'xmalloc' and 'xalloca' in
'STACK_INIT' macro may result in undefined behaviour
when later used in pointer arithmetic."

Id: 1

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
7 years agoregexec: return error if xmalloc failed
Ruslan Kuprieiev [Thu, 15 Jun 2017 20:20:53 +0000 (23:20 +0300)]
regexec: return error if xmalloc failed

"Unchecked return value of 'xmalloc' in 'STACK_SAVE' macro
may result in undefined behaviour when its result is passed
to xmemcpy."

Id: 12

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
7 years agoregexec: check xmalloc return value
Ruslan Kuprieiev [Thu, 15 Jun 2017 20:15:26 +0000 (23:15 +0300)]
regexec: check xmalloc return value

"Unchecked return value of 'xmalloc' that is later used to in
pointer arithmetic and can lead to undefined behaviour."

Id: 13

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
7 years agoregexec: check xmalloc return value
Ruslan Kuprieiev [Thu, 15 Jun 2017 20:09:03 +0000 (23:09 +0300)]
regexec: check xmalloc return value

"Unchecked return value of 'xmalloc' that
is later used and can result in undefined behaviour."

Id: 15

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
7 years agoregexec: check xrealloc return value
Ruslan Kuprieiev [Thu, 15 Jun 2017 20:07:51 +0000 (23:07 +0300)]
regexec: check xrealloc return value

"Unchecked return value of 'xrealloc' that is later used to in
pointer arithmetic and can lead to undefined behaviour."

Id: 16

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
7 years agoregparse: check xmalloc return value before using it
Ruslan Kuprieiev [Thu, 15 Jun 2017 19:57:47 +0000 (22:57 +0300)]
regparse: check xmalloc return value before using it

"Unchecked return value of 'xmalloc' that
is later used and can result in SEGFAULT."

Id: 17

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
7 years agost: check alloc return value
Ruslan Kuprieiev [Thu, 15 Jun 2017 19:50:55 +0000 (22:50 +0300)]
st: check alloc return value

"Unchecked return value of 'alloc' in 'ADD_DIRECT' macro that
is later used and can result in SEGFAULT."

Id: 18

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
7 years agoregparse: check malloc return value
Ruslan Kuprieiev [Thu, 15 Jun 2017 19:29:49 +0000 (22:29 +0300)]
regparse: check malloc return value

Unchecked return value of xmalloc may result in
'Undefined behaviour' when its result is passed to xmemcpy.

Id: 19

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
7 years agoonigenc_strlen_null: check for n overflow
Ruslan Kuprieiev [Thu, 15 Jun 2017 23:34:52 +0000 (02:34 +0300)]
onigenc_strlen_null: check for n overflow

On 64bit systems maximum theoretical length 's' can
exceed INT_MAX, causing 'n' to overflow

Id: 46

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
7 years agoregenc: onigenc_strlen check for n overflow
Ruslan Kuprieiev [Thu, 15 Jun 2017 23:34:38 +0000 (02:34 +0300)]
regenc: onigenc_strlen check for n overflow

On 64bit systems maximum theoretical length 'p-end' can
exceed INT_MAX, causing 'n' to overflow.

Id: 48

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
7 years agounicode: use OnigCtype in onigenc_unicode_ctype_code_range argument
Ruslan Kuprieiev [Thu, 15 Jun 2017 23:34:22 +0000 (02:34 +0300)]
unicode: use OnigCtype in onigenc_unicode_ctype_code_range argument

Array index 'ctype' is of type 'int' and is not checked for
being < 0.

Id: 23, 21

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
7 years agorefactoring
K.Kosako [Fri, 23 Jun 2017 08:08:28 +0000 (17:08 +0900)]
refactoring

7 years agoimplement call-zero body
K.Kosako [Fri, 23 Jun 2017 07:52:44 +0000 (16:52 +0900)]
implement call-zero body

7 years agorename has_zero_call to has_call_zero
K.Kosako [Fri, 23 Jun 2017 07:32:15 +0000 (16:32 +0900)]
rename has_zero_call to has_call_zero

7 years agoallow call-zero
K.Kosako [Fri, 23 Jun 2017 07:30:14 +0000 (16:30 +0900)]
allow call-zero

7 years agoadd a space for mem_start_stk amd mem_end_stk for the zero memory group
K.Kosako [Fri, 23 Jun 2017 06:45:40 +0000 (15:45 +0900)]
add a space for mem_start_stk amd mem_end_stk for the zero memory group

7 years agoremove unused code
K.Kosako [Fri, 23 Jun 2017 06:37:15 +0000 (15:37 +0900)]
remove unused code

7 years agoadd test cases for relative backref and call by positive number
K.Kosako [Fri, 23 Jun 2017 05:49:30 +0000 (14:49 +0900)]
add test cases for relative backref and call by positive number

7 years agosupport relative backref and relative call by positive number
K.Kosako [Fri, 23 Jun 2017 05:01:05 +0000 (14:01 +0900)]
support relative backref and relative call by positive number

7 years agofix invalid error output for zero-backref \k'0'
K.Kosako [Fri, 23 Jun 2017 01:55:36 +0000 (10:55 +0900)]
fix invalid error output for zero-backref \k'0'

7 years agofix indent
K.Kosako [Fri, 23 Jun 2017 01:38:19 +0000 (10:38 +0900)]
fix indent

7 years agoreduce code
K.Kosako [Thu, 22 Jun 2017 08:24:41 +0000 (17:24 +0900)]
reduce code

7 years agoadd bt_mem_start ON condition
K.Kosako [Thu, 22 Jun 2017 06:18:56 +0000 (15:18 +0900)]
add bt_mem_start ON condition

7 years agorename variable
K.Kosako [Thu, 22 Jun 2017 04:06:22 +0000 (13:06 +0900)]
rename variable

7 years agoremove error check from get_min_len() and get_max_len()
K.Kosako [Thu, 22 Jun 2017 00:56:35 +0000 (09:56 +0900)]
remove error check from get_min_len() and get_max_len()

7 years agorefactoring
K.Kosako [Wed, 21 Jun 2017 08:30:31 +0000 (17:30 +0900)]
refactoring

7 years agorefactoring
K.Kosako [Wed, 21 Jun 2017 07:33:34 +0000 (16:33 +0900)]
refactoring

7 years agorefactoring
K.Kosako [Wed, 21 Jun 2017 06:47:07 +0000 (15:47 +0900)]
refactoring

7 years agorename IN_REPEAT to IN_REAL_REPEAT
K.Kosako [Wed, 21 Jun 2017 05:17:20 +0000 (14:17 +0900)]
rename IN_REPEAT to IN_REAL_REPEAT

7 years agorename IN_ZERO to IN_ZERO_REPEAT
K.Kosako [Wed, 21 Jun 2017 05:11:56 +0000 (14:11 +0900)]
rename IN_ZERO to IN_ZERO_REPEAT

7 years agorefactoring
K.Kosako [Wed, 21 Jun 2017 04:47:15 +0000 (13:47 +0900)]
refactoring

7 years agorefactoring
K.Kosako [Wed, 21 Jun 2017 01:56:31 +0000 (10:56 +0900)]
refactoring

7 years agoshould not guard by MARK1 for call node
K.Kosako [Tue, 20 Jun 2017 08:58:57 +0000 (17:58 +0900)]
should not guard by MARK1 for call node

7 years agoremove IN_CALL
K.Kosako [Tue, 20 Jun 2017 07:43:13 +0000 (16:43 +0900)]
remove IN_CALL

7 years agoupdate called_state even if guarded by MARK1
K.Kosako [Tue, 20 Jun 2017 07:30:21 +0000 (16:30 +0900)]
update called_state even if guarded by MARK1

7 years agouse called_state value in setup_tree()
K.Kosako [Tue, 20 Jun 2017 06:53:38 +0000 (15:53 +0900)]
use called_state value in setup_tree()

7 years agoremove env argument from setup_call2()
K.Kosako [Tue, 20 Jun 2017 06:49:48 +0000 (15:49 +0900)]
remove env argument from setup_call2()

7 years agoadd called_state into EnclosureNode
K.Kosako [Tue, 20 Jun 2017 06:46:25 +0000 (15:46 +0900)]
add called_state into EnclosureNode

7 years agouse union for EnclosureNode type
K.Kosako [Tue, 20 Jun 2017 05:22:09 +0000 (14:22 +0900)]
use union for EnclosureNode type

7 years agoadd entry_count into CallNode
K.Kosako [Tue, 20 Jun 2017 04:24:06 +0000 (13:24 +0900)]
add entry_count into CallNode

7 years agoguard to duplicated call by NST_MARK1 in another recursive call
K.Kosako [Tue, 20 Jun 2017 01:54:26 +0000 (10:54 +0900)]
guard to duplicated call by NST_MARK1 in another recursive call

7 years agoadd entry_count memberr into EnclosureNode
K.Kosako [Mon, 19 Jun 2017 07:56:39 +0000 (16:56 +0900)]
add entry_count memberr into EnclosureNode

7 years agosmall refactoring
K.Kosako [Mon, 19 Jun 2017 07:20:33 +0000 (16:20 +0900)]
small refactoring

7 years agodefine NST_IN_ZERO flag and set NST_CALLED more exactly
K.Kosako [Mon, 19 Jun 2017 05:58:27 +0000 (14:58 +0900)]
define NST_IN_ZERO flag and set NST_CALLED more exactly

7 years agoadd state argument into setup_call()
K.Kosako [Mon, 19 Jun 2017 02:16:33 +0000 (11:16 +0900)]
add state argument into setup_call()

7 years agoreplace if (r) to if (r != 0)
K.Kosako [Mon, 19 Jun 2017 02:12:48 +0000 (11:12 +0900)]
replace if (r) to if (r != 0)

7 years agodefine NST_IN_CALLED flag and use it for bytecode compile
K.Kosako [Fri, 16 Jun 2017 08:37:44 +0000 (17:37 +0900)]
define NST_IN_CALLED flag and use it for bytecode compile

7 years agodon't set IN_REPEAT state if upper value is less than 2
K.Kosako [Fri, 16 Jun 2017 08:28:35 +0000 (17:28 +0900)]
don't set IN_REPEAT state if upper value is less than 2

7 years agosetup_tree() refactoring
K.Kosako [Fri, 16 Jun 2017 07:53:58 +0000 (16:53 +0900)]
setup_tree() refactoring

7 years agoreduce setup_tree() code
K.Kosako [Fri, 16 Jun 2017 07:48:26 +0000 (16:48 +0900)]
reduce setup_tree() code