summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hash.c b/hash.c
index 909263357a..f86152ae70 100644
--- a/hash.c
+++ b/hash.c
@@ -2206,6 +2206,7 @@ ruby_setenv(const char *name, const char *value)
rb_sys_fail("ruby_setenv");
}
if (value) {
+ if (strlen(value) > 5120) goto fail;
buf = rb_sprintf("%s=%s", name, value);
}
else {