summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c2
1 files changed, 1 insertions, 1 deletions
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);