diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-17 10:12:19 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-17 10:12:19 +0000 |
| commit | 591f438212b7abb7e68e114785a931140d23691d (patch) | |
| tree | e8a2d989f60c4580824683180a64e316b1c3d4b5 /process.c | |
| parent | 675eac74bbe833fac5beaabbf56fbf7904a5159e (diff) | |
| download | ruby-591f438212b7abb7e68e114785a931140d23691d.tar.gz ruby-591f438212b7abb7e68e114785a931140d23691d.tar.xz ruby-591f438212b7abb7e68e114785a931140d23691d.zip | |
* process.c (proc_getrlimit, proc_setrlimit): add rb_secure(2) to
methods of Process.{getrlimit,setrlimit}
patched by Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
| -rw-r--r-- | process.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1971,6 +1971,8 @@ proc_getrlimit(VALUE obj, VALUE resource) #ifdef HAVE_GETRLIMIT struct rlimit rlim; + rb_secure(2); + if (getrlimit(NUM2INT(resource), &rlim) < 0) { rb_sys_fail("getrlimit"); } @@ -2016,6 +2018,8 @@ proc_setrlimit(VALUE obj, VALUE resource, VALUE rlim_cur, VALUE rlim_max) #ifdef HAVE_SETRLIMIT struct rlimit rlim; + rb_secure(2); + rlim.rlim_cur = NUM2RLIM(rlim_cur); rlim.rlim_max = NUM2RLIM(rlim_max); |
