unsafe
C# creating buffer overflow
I\'m trying to create a buffer overflow with C# for a school project: unsafe { fixed (char* ptr_str = new char[6] {\'H\', \'a\', \'l\', \'l\', \'o\', \',\'})[详细]
2023-02-08 12:20 分类:问答Convert pointer to loop option in C#
How would I convert this into 开发者_JAVA百科a loop and not to use the pointer. byte[] InputBuffer = new byte[8];[详细]
2023-02-08 10:35 分类:问答How int* is bool in C#?
I am trying to use pointers in C# like in C. public static void Main(string[] args) { unsafe { int i = 5; int* j = &i;[详细]
2023-02-06 01:44 分类:问答A class for efficient key generation
So, I am looking into efficient ways of generating a unique key that is based on an integer array and can be stored in a database column.[详细]
2023-02-05 19:03 分类:问答C# compile errors in unsafe code
Compiling a VS 2010 c# project (.NET 4.0, any CPU, allow unsafe code = checked) we are gett开发者_如何学运维ing a variety of compile errors as below:[详细]
2023-01-30 10:30 分类:问答Throwing an Exception using Unsafe.getUnsafe().throwException
I came across some interesting code in java.lang.Class#newInstance0: // Run constructor try { return tmpConstructor.newInstance((Object[])null);[详细]
2023-01-29 10:12 分类:问答Casting between signed and unsigned
Is this safe: int main() { boost::int16_t t1 = 50000; // overflow here. boost::uint16_t t2 = (boost::uint16_t)t1;[详细]
2023-01-26 12:10 分类:问答Is my php codes safe?
Is my php codes safe ? <?php $item = (int)$_GET[\'item\']; if (!isset($_GET[\'item\'])) { header(\'Location: index.php\');[详细]
2023-01-24 12:33 分类:问答Textareas and unsafe content
I\'ve got wiki style content which is sanitized and stored in another field of the db for output as html. The original body field I\'m not sure how to deal with as when I santize it characters are esc[详细]
2023-01-24 06:53 分类:问答Are efficient fixed-size arrays possible without using unsafe code in .NET?
Is there a good way of implementing a fixed-size array in .NET that does not require unsafe code? My goal is to create a value type which represents a fixed-size array which can be embedded (included[详细]
2023-01-23 19:47 分类:问答