ruby-changes:32652
From: tenderlove <ko1@a...>
Date: Wed, 29 Jan 2014 03:53:28 +0900 (JST)
Subject: [ruby-changes:32652] tenderlove:r44731 (trunk): * ext/fiddle/closure.c: use sizeof(*pcl) for correct sizeof value.
tenderlove 2014-01-29 03:53:23 +0900 (Wed, 29 Jan 2014) New Revision: 44731 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44731 Log: * ext/fiddle/closure.c: use sizeof(*pcl) for correct sizeof value. [ruby-core:57599] [Bug #8978]. Thanks mame! Modified files: trunk/ChangeLog trunk/ext/fiddle/closure.c Index: ChangeLog =================================================================== --- ChangeLog (revision 44730) +++ ChangeLog (revision 44731) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Jan 29 03:49:36 2014 Aaron Patterson <aaron@t...> + + * ext/fiddle/closure.c: use sizeof(*pcl) for correct sizeof value. + [ruby-core:57599] [Bug #8978]. Thanks mame! + Wed Jan 29 03:36:42 2014 Eric Wong <e@8...> * doc/contributing.rdoc: allow/encourage other git hosts Index: ext/fiddle/closure.c =================================================================== --- ext/fiddle/closure.c (revision 44730) +++ ext/fiddle/closure.c (revision 44731) @@ -234,7 +234,7 @@ initialize(int rbargc, VALUE argv[], VAL https://github.com/ruby/ruby/blob/trunk/ext/fiddle/closure.c#L234 #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"); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/