summaryrefslogtreecommitdiff
path: root/ext/fiddle
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-28 18:53:23 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-28 18:53:23 +0000
commit2ee916752c7be930b2340a0eb8a0c1fcc8714532 (patch)
tree189c170715627db157d9be1591da619c39df736d /ext/fiddle
parentc4bf5e0c9826cbcc825ebe90acf1948e0b0f93b6 (diff)
* ext/fiddle/closure.c: use sizeof(*pcl) for correct sizeof value.
[ruby-core:57599] [Bug #8978]. Thanks mame! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/fiddle')
-rw-r--r--ext/fiddle/closure.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/fiddle/closure.c b/ext/fiddle/closure.c
index 121a08e..cb0c462 100644
--- a/ext/fiddle/closure.c
+++ b/ext/fiddle/closure.c
@@ -234,7 +234,7 @@ initialize(int rbargc, VALUE argv[], VALUE self)
#else
result = ffi_prep_closure(pcl, cif, callback, (void *)self);
cl->code = (void *)pcl;
- i = mprotect(pcl, sizeof(pcl), PROT_READ | PROT_EXEC);
+ i = mprotect(pcl, sizeof(*pcl), PROT_READ | PROT_EXEC);
if (i) {
rb_sys_fail("mprotect");
}