зеркало из https://github.com/github/ruby.git
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@7299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
3691ea5cf4
Коммит
6c8ffdbf32
|
@ -1,3 +1,8 @@
|
|||
Wed Nov 17 18:59:16 2004 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
|
||||
|
||||
* process.c (proc_getrlimit, proc_setrlimit): add rb_secure(2) to
|
||||
methods of Process.{getrlimit,setrlimit}
|
||||
|
||||
Wed Nov 17 13:05:10 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* dir.c (rb_push_glob): fix overrun. [ruby-dev:24886]
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче