summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--bignum.c2
-rw-r--r--configure.in2
-rw-r--r--dir.c6
-rw-r--r--lib/cgi/session.rb17
-rw-r--r--version.h4
6 files changed, 25 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 6475005766..a4db8b36b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
* eval.c (is_defined): core dumped during instance_eval for
diff --git a/bignum.c b/bignum.c
index 708d74c155..ecb26a7604 100644
--- a/bignum.c
+++ b/bignum.c
@@ -918,7 +918,7 @@ bigdivrem(x, y, divp, modp)
if (modp) { /* just normalize remainder */
*modp = rb_big_clone(z);
zds = BDIGITS(*modp);
- while (0 < ny && !zds[ny-1]) ny--;
+ while (ny-- && !zds[ny]); ++ny;
if (dd) {
t2 = 0; i = ny;
while(i--) {
diff --git a/configure.in b/configure.in
index 20a0a19199..65a560be28 100644
--- a/configure.in
+++ b/configure.in
@@ -543,6 +543,8 @@ if test "$with_dln_a_out" != yes; then
rb_cv_dlopen=yes;;
sysv4*) LDSHARED='ld -G'
rb_cv_dlopen=yes;;
+ nto-qnx*) LDSHARED="qcc -shared"
+ rb_cv_dlopen=yes ;;
esix*|uxpds*) LDSHARED="ld -G"
rb_cv_dlopen=yes ;;
osf*) LDSHARED="$CC -shared"
diff --git a/dir.c b/dir.c
index 16df31b2c3..f2f4faa8aa 100644
--- a/dir.c
+++ b/dir.c
@@ -134,13 +134,13 @@ range(pat, test, flags)
((s) == string || pathname && isdirsep(*(s))))
static int
fnmatch(pat, string, flags)
- char *pat;
- char *string;
+ const char *pat;
+ const char *string;
int flags;
{
int c;
int test;
- char *s = string;
+ const char *s = string;
int escape = !(flags & FNM_NOESCAPE);
int pathname = flags & FNM_PATHNAME;
int period = flags & FNM_PERIOD;
diff --git a/lib/cgi/session.rb b/lib/cgi/session.rb
index 1120fb50f0..1a3379b88a 100644
--- a/lib/cgi/session.rb
+++ b/lib/cgi/session.rb
@@ -96,10 +96,19 @@ class CGI
end
class FileStore
+ def check_id(id)
+ /[^0-9a-zA-Z]/ =~ id.to_s ? false : true
+ end
+ module_function :check_id
+
def initialize(session, option={})
dir = option['tmpdir'] || ENV['TMP'] || '/tmp'
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
unless File::exist? path
@hash = {}
@@ -149,9 +158,9 @@ class CGI
class MemoryStore
GLOBAL_HASH_TABLE = {}
- def initialize(session, option={})
+ def initialize(session, option=nil)
@session_id = session.session_id
- GLOBAL_HASH_TABLE[@session_id] = {}
+ GLOBAL_HASH_TABLE[@session_id] ||= {}
end
def restore
@@ -167,7 +176,7 @@ class CGI
end
def delete
- GLOBAL_HASH_TABLE[@session_id] = nil
+ GLOBAL_HASH_TABLE.delete(@session_id)
end
end
end
diff --git a/version.h b/version.h
index 87cfa89472..e2956eb961 100644
--- a/version.h
+++ b/version.h
@@ -1,4 +1,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_RELEASE_CODE 20010508
+#define RUBY_RELEASE_CODE 20010511