summaryrefslogtreecommitdiff
path: root/ext/psych/yaml/reader.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/psych/yaml/reader.c')
-rw-r--r--ext/psych/yaml/reader.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/psych/yaml/reader.c b/ext/psych/yaml/reader.c
index f1a06de..f3ac54c 100644
--- a/ext/psych/yaml/reader.c
+++ b/ext/psych/yaml/reader.c
@@ -460,10 +460,10 @@ yaml_parser_update_buffer(yaml_parser_t *parser, size_t length)
}
- if (parser->offset >= PTRDIFF_MAX)
+ if (parser->offset >= MAX_FILE_SIZE) {
return yaml_parser_set_reader_error(parser, "input is too long",
- PTRDIFF_MAX, -1);
+ parser->offset, -1);
+ }
return 1;
}
-