mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* bignum.c (bigdivrem): access boundary bug.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ba9003a0a3
commit
eeb7234919
6 changed files with 25 additions and 10 deletions
|
|
@ -1,3 +1,7 @@
|
||||||
|
Fri May 11 02:00:44 2001 Ryo HAYASAKA <ryoh@jaist.ac.jp>
|
||||||
|
|
||||||
|
* bignum.c (bigdivrem): access boundary bug.
|
||||||
|
|
||||||
Tue May 8 17:12:43 2001 K.Kosako <kosako@sofnec.co.jp>
|
Tue May 8 17:12:43 2001 K.Kosako <kosako@sofnec.co.jp>
|
||||||
|
|
||||||
* eval.c (is_defined): core dumped during instance_eval for
|
* eval.c (is_defined): core dumped during instance_eval for
|
||||||
|
|
|
||||||
2
bignum.c
2
bignum.c
|
|
@ -918,7 +918,7 @@ bigdivrem(x, y, divp, modp)
|
||||||
if (modp) { /* just normalize remainder */
|
if (modp) { /* just normalize remainder */
|
||||||
*modp = rb_big_clone(z);
|
*modp = rb_big_clone(z);
|
||||||
zds = BDIGITS(*modp);
|
zds = BDIGITS(*modp);
|
||||||
while (0 < ny && !zds[ny-1]) ny--;
|
while (ny-- && !zds[ny]); ++ny;
|
||||||
if (dd) {
|
if (dd) {
|
||||||
t2 = 0; i = ny;
|
t2 = 0; i = ny;
|
||||||
while(i--) {
|
while(i--) {
|
||||||
|
|
|
||||||
|
|
@ -543,6 +543,8 @@ if test "$with_dln_a_out" != yes; then
|
||||||
rb_cv_dlopen=yes;;
|
rb_cv_dlopen=yes;;
|
||||||
sysv4*) LDSHARED='ld -G'
|
sysv4*) LDSHARED='ld -G'
|
||||||
rb_cv_dlopen=yes;;
|
rb_cv_dlopen=yes;;
|
||||||
|
nto-qnx*) LDSHARED="qcc -shared"
|
||||||
|
rb_cv_dlopen=yes ;;
|
||||||
esix*|uxpds*) LDSHARED="ld -G"
|
esix*|uxpds*) LDSHARED="ld -G"
|
||||||
rb_cv_dlopen=yes ;;
|
rb_cv_dlopen=yes ;;
|
||||||
osf*) LDSHARED="$CC -shared"
|
osf*) LDSHARED="$CC -shared"
|
||||||
|
|
|
||||||
6
dir.c
6
dir.c
|
|
@ -134,13 +134,13 @@ range(pat, test, flags)
|
||||||
((s) == string || pathname && isdirsep(*(s))))
|
((s) == string || pathname && isdirsep(*(s))))
|
||||||
static int
|
static int
|
||||||
fnmatch(pat, string, flags)
|
fnmatch(pat, string, flags)
|
||||||
char *pat;
|
const char *pat;
|
||||||
char *string;
|
const char *string;
|
||||||
int flags;
|
int flags;
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
int test;
|
int test;
|
||||||
char *s = string;
|
const char *s = string;
|
||||||
int escape = !(flags & FNM_NOESCAPE);
|
int escape = !(flags & FNM_NOESCAPE);
|
||||||
int pathname = flags & FNM_PATHNAME;
|
int pathname = flags & FNM_PATHNAME;
|
||||||
int period = flags & FNM_PERIOD;
|
int period = flags & FNM_PERIOD;
|
||||||
|
|
|
||||||
|
|
@ -96,10 +96,19 @@ class CGI
|
||||||
end
|
end
|
||||||
|
|
||||||
class FileStore
|
class FileStore
|
||||||
|
def check_id(id)
|
||||||
|
/[^0-9a-zA-Z]/ =~ id.to_s ? false : true
|
||||||
|
end
|
||||||
|
module_function :check_id
|
||||||
|
|
||||||
def initialize(session, option={})
|
def initialize(session, option={})
|
||||||
dir = option['tmpdir'] || ENV['TMP'] || '/tmp'
|
dir = option['tmpdir'] || ENV['TMP'] || '/tmp'
|
||||||
prefix = option['prefix'] || ''
|
prefix = option['prefix'] || ''
|
||||||
path = dir+"/"+prefix+session.session_id
|
id = session.session_id
|
||||||
|
unless check_id(id)
|
||||||
|
raise ArgumentError, "session_id `%s' is invalid" % id
|
||||||
|
end
|
||||||
|
path = dir+"/"+prefix+id
|
||||||
path.untaint
|
path.untaint
|
||||||
unless File::exist? path
|
unless File::exist? path
|
||||||
@hash = {}
|
@hash = {}
|
||||||
|
|
@ -149,9 +158,9 @@ class CGI
|
||||||
class MemoryStore
|
class MemoryStore
|
||||||
GLOBAL_HASH_TABLE = {}
|
GLOBAL_HASH_TABLE = {}
|
||||||
|
|
||||||
def initialize(session, option={})
|
def initialize(session, option=nil)
|
||||||
@session_id = session.session_id
|
@session_id = session.session_id
|
||||||
GLOBAL_HASH_TABLE[@session_id] = {}
|
GLOBAL_HASH_TABLE[@session_id] ||= {}
|
||||||
end
|
end
|
||||||
|
|
||||||
def restore
|
def restore
|
||||||
|
|
@ -167,7 +176,7 @@ class CGI
|
||||||
end
|
end
|
||||||
|
|
||||||
def delete
|
def delete
|
||||||
GLOBAL_HASH_TABLE[@session_id] = nil
|
GLOBAL_HASH_TABLE.delete(@session_id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#define RUBY_VERSION "1.6.4"
|
#define RUBY_VERSION "1.6.4"
|
||||||
#define RUBY_RELEASE_DATE "2001-05-08"
|
#define RUBY_RELEASE_DATE "2001-05-11"
|
||||||
#define RUBY_VERSION_CODE 164
|
#define RUBY_VERSION_CODE 164
|
||||||
#define RUBY_RELEASE_CODE 20010508
|
#define RUBY_RELEASE_CODE 20010511
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue