1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

fix offset value in STATE_CHECK_BUFF_INIT()

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kosako 2006-10-29 10:55:27 +00:00
parent 92d805753b
commit ab984108d7
3 changed files with 9 additions and 4 deletions

View file

@ -1,3 +1,7 @@
Sun Oct 29 19:51:31 2006 K.Kosako <sndgk393 AT ybb.ne.jp>
* regexec.c: invalid offset value was used in STATE_CHECK_BUFF_INIT().
Sat Oct 28 20:13:18 2006 K.Kosako <sndgk393 AT ybb.ne.jp>
* oniguruma.h: Version 4.4.5

View file

@ -390,7 +390,8 @@ typedef struct {
#define STATE_CHECK_BUFF_INIT(msa, str_len, offset, state_num) do { \
if ((state_num) > 0 && str_len >= STATE_CHECK_STRING_THRESHOLD_LEN) {\
int size = ((int )((str_len) + 1) * (state_num) + 7) / 8;\
unsigned int size = (unsigned int )(((str_len) + 1) * (state_num) + 7) >> 3;\
offset = ((offset) * (state_num)) >> 3;\
if (size > 0 && offset < size && size < STATE_CHECK_BUFF_MAX_SIZE) {\
if (size >= STATE_CHECK_BUFF_MALLOC_THRESHOLD_SIZE) \
(msa).state_check_buff = (void* )xmalloc(size);\

View file

@ -1,14 +1,14 @@
#define RUBY_VERSION "1.9.0"
#define RUBY_RELEASE_DATE "2006-10-28"
#define RUBY_RELEASE_DATE "2006-10-29"
#define RUBY_VERSION_CODE 190
#define RUBY_RELEASE_CODE 20061028
#define RUBY_RELEASE_CODE 20061029
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 9
#define RUBY_VERSION_TEENY 0
#define RUBY_RELEASE_YEAR 2006
#define RUBY_RELEASE_MONTH 10
#define RUBY_RELEASE_DAY 28
#define RUBY_RELEASE_DAY 29
RUBY_EXTERN const char ruby_version[];
RUBY_EXTERN const char ruby_release_date[];