Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

StringOverwriting

Can we change the value of string.Empty, so it is no longer empty?

Conclusion

Yes. It is possible to access and modify the internal length counter of a string, as well as change the content of the string, thereby making the string longer.

This will overwrite any memory that is located right after the string. Doing so can result in a fatal errors, if the new string content is sufficiently long.