Bug #72777 [Asn]: Use onig_set_match_stack_limit_size() with mbregex

From: Date: Thu, 01 Sep 2016 11:11:05 +0000
Subject: Bug #72777 [Asn]: Use onig_set_match_stack_limit_size() with mbregex
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-203723@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72777&edit=1

 ID:                 72777
 Updated by:         yohgaki@php.net
 Reported by:        yohgaki@php.net
 Summary:            Use onig_set_match_stack_limit_size() with mbregex
 Status:             Assigned
 Type:               Bug
 Package:            mbstring related
 Operating System:   Irrelevant
 PHP Version:        Irrelevant
 Assigned To:        yohgaki
 Block user comment: N
 Private report:     N

 New Comment:

Added test for Bug #53099. It seems it works.


Previous Comments:
------------------------------------------------------------------------
[2016-09-01 10:29:57] yohgaki@php.net

Thank you @cmb

Added PR.
Unfortunately, this does not mitigate Bug #60664 :(

------------------------------------------------------------------------
[2016-08-20 15:24:48] cmb@php.net

Related To: Bug #53099

------------------------------------------------------------------------
[2016-08-20 15:17:26] cmb@php.net

Related To: Bug #60664

------------------------------------------------------------------------
[2016-08-07 23:47:54] yohgaki@php.net

Description:
------------
Oniguruma has
onig_set_match_stack_limit_size()
and it should be used for mbregex.

extern int main(int argc, char* argv[])
{
#define MAX_SIZE   1000000

  int len;
  int i;
  char s[MAX_SIZE];

  len = atoi(argv[1]);
  fprintf(stdout, "len: %d\n", len);
  for (i = 0; i < len; i++) {
    s[i] = ' ';
  }
  s[len] = 'a';
  s[len + 1] = '\0';

  onig_set_match_stack_limit_size(30000);

  exec(ONIG_ENCODING_UTF8, ONIG_ENCODING_UTF8, ONIG_OPTION_NONE,
       "\\s+$", s);
  return 0;
}





------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=72777&edit=1


Thread (5 messages)

« previous php.bugs (#203723) next »