I'm pretty sure this happened on a corrupted buffer, probably with some binary data. I can no longer find a reproducible test case. But, it did lead to add a catch for NotSupportedException, as well, at line 100. Such as:
catch (Exception exception) when
(exception is ArgumentException || // unsupported name
exception is NotSupportedException)
at src/DetectionDetail.cs, line 98.
The exception message is "NotSupportedException: Support for UTF-7 is disabled. See https://aka.ms/dotnet-warnings/SYSLIB0001 for more information.
I'm pretty sure this happened on a corrupted buffer, probably with some binary data. I can no longer find a reproducible test case. But, it did lead to add a catch for NotSupportedException, as well, at line 100. Such as: