summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--ruby.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 0202af0076..993dea9ff8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
Fri Apr 16 15:09:20 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * bignum.c (rb_str2inum): strtoul() returns long, not int.
+
+ * eval.c (rb_load): size of VALUE and ID may be different.
+
* util.c (mmprepare): int is too small to cast from pointers.
* config.guess: avoid 'linux-gnu' for alpha-unknown-linux.
diff --git a/ruby.c b/ruby.c
index 7fca55f2d5..10df06542e 100644
--- a/ruby.c
+++ b/ruby.c
@@ -149,7 +149,7 @@ rubylib_mangle(s, l)
newp++; /* Skip whitespace. */
}
newl = strlen(newp);
- if (newl == 0 || oldl == 0) {
+ if (newl == 0 || oldl == 0 || newl > STATIC_FILE_LENGTH) {
Fatal("malformed RUBYLIB_PREFIX");
}
strcpy(ret, newp);