summaryrefslogtreecommitdiff
path: root/eval_intern.h
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-20 13:22:26 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-20 13:22:26 +0000
commitb6e3b715dd11097a8d8d14371a5a90b4c8964d18 (patch)
tree0d3187ad27dd6687062b626922a82edfc297e6f6 /eval_intern.h
parenta90f3bcb0c230bfdc050d8326db4974715ea01fe (diff)
merges r29800 from trunk into ruby_1_9_2.
-- * eval_intern.h (CHECK_STACK_OVERFLOW): it was not intended to add size_t to a pointer typed VALUE*. Coverity Scan found this defect. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_intern.h')
-rw-r--r--eval_intern.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval_intern.h b/eval_intern.h
index 1a3b16dcfb..3e1996c345 100644
--- a/eval_intern.h
+++ b/eval_intern.h
@@ -172,7 +172,7 @@ enum ruby_tag_type {
#define SCOPE_SET(f) (rb_vm_cref()->nd_visi = (f))
#define CHECK_STACK_OVERFLOW(cfp, margin) do \
- if (((VALUE *)(cfp)->sp) + (margin) + sizeof(rb_control_frame_t) >= ((VALUE *)cfp)) { \
+ if ((VALUE *)((char *)(((VALUE *)(cfp)->sp) + (margin)) + sizeof(rb_control_frame_t)) >= ((VALUE *)cfp)) { \
rb_exc_raise(sysstack_error); \
} \
while (0)