File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
AwsEncryptionSDK/runtimes/net/Generated/AwsEncryptionSdk Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -754,6 +754,17 @@ public static System.IO.MemoryStream FromDafny_N6_smithy__N3_api__S4_Blob(Dafny.
754
754
755
755
public static Dafny . ISequence < byte > ToDafny_N6_smithy__N3_api__S4_Blob ( System . IO . MemoryStream value )
756
756
{
757
+ // BEGIN MANUAL EDIT
758
+ // It is possible for a MemoryStream to be implemented by another stream,
759
+ // which may or may not be backed with an array.
760
+ // If the array is empty, but the stream isn't, then
761
+ // the backing stream cannot be treated as a MemoryStream
762
+ // for purposes of type conversion through ToArray().
763
+ if ( value . ToArray ( ) . Length == 0 && value . Length > 0 )
764
+ {
765
+ throw new System . ArgumentException ( "Fatal Error: MemoryStream instance not backed by an array!" ) ;
766
+ }
767
+ // END MANUAL EDIT
757
768
return Dafny . Sequence < byte > . FromArray ( value . ToArray ( ) ) ;
758
769
}
759
770
You can’t perform that action at this time.
0 commit comments