forked from mono/mono
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sre] Handle null values in MarshalAsAttribute CustomAttributeBuilder
Normally strings are encoded as length-then-utf8 in ECMA-335. But a null String is encoded as just the byte 0xFF. When we make a CustomAttributeBuilder for a MarshalAsAttribute and attach it to some parameter we first encode the CAB as a byte blob and then decode it in CAB.get_umarshal into a UnmanagedMarshal attribute. But the decoding didn't account for the possibility of null strings. Fixes mono#12747
- Loading branch information
1 parent
22911b0
commit c93fe36
Showing
2 changed files
with
78 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters