I got an IndexOutOfRangeException when reader.CurrentSpan.Length = 65536, reader.CurrentSpanIndex = 65535, offset = 1. remainingOffset = -1 causes the exception.
using var fs = new FileStream(path, new FileStreamOptions(){Access = FileAccess.Read, Options = FileOptions.Asynchronous});
var root = await YamlSerializer.DeserializeMultipleDocumentsAsync<dynamic>(fs);
This is related to DeserializeMultipleDocumentsAsync and maybe StreamHelper codes.
If I use DeserializeMultipleDocuments, there is no error.
https://github.com/hadashiA/VYaml/blob/7f1c814f16ea11699843a69d9db11e0319299f31/VYaml.Core/Parser/Utf8YamlTokenizer.cs#L1596
I got an
IndexOutOfRangeException
whenreader.CurrentSpan.Length = 65536
,reader.CurrentSpanIndex = 65535
,offset = 1
.remainingOffset = -1
causes the exception.You can test with this yaml: ROP.yaml.txt
This is related to
DeserializeMultipleDocumentsAsync
and maybeStreamHelper
codes. If I useDeserializeMultipleDocuments
, there is no error.