This PR fixes a couple of issues with reading specially crafted files that abuse implementation quirks of the CLR metadata reader.
The following quirks were addressed (sample files can be found in the PR):
The presence of the #Schema stream forces the parsing of metadata as if it was EnC metadata even if the tablees stream name suggests compressed metadata.
When reading EnC metadata, the CLR performs a case insensitive comparison when looking for stream names#Blob, #US, #Strings, #GUID as compared to byte for byte compare when reading compressed metadata.
When reading EnC metadata, the CLR checks for the presence of a stream named #JTD and if it found it forces all column index sizes to 4 bytes.
All the above-mentioned quirks were addressed in the PR and have accompanying tests.
This PR fixes a couple of issues with reading specially crafted files that abuse implementation quirks of the CLR metadata reader.
The following quirks were addressed (sample files can be found in the PR):
#Schema
stream forces the parsing of metadata as if it was EnC metadata even if the tablees stream name suggests compressed metadata.#Blob
,#US
,#Strings
,#GUID
as compared to byte for byte compare when reading compressed metadata.#JTD
and if it found it forces all column index sizes to 4 bytes.All the above-mentioned quirks were addressed in the PR and have accompanying tests.