Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- memcpy



  memcpy() vs memmove() in C

memcpy() copies the bytes of data between memory blocks. If the block of memory overlaps, the function might not work properly. Use memmove() to deal with overlapping memory blocks. memmove() is very much like memcpy() but very flexible as it handles overlapping of memory blocks. example : char msg[50] = "abcdefghijklmnopqrstuvwxyz"; char temp[50]; main() { strcpy(temp, msg); printf("Original Msg = %s\n",temp); memcpy(temp+4, temp+16, 10); printf...

   Memory,memcpy,memmove,C,comparison,diffe     2011-04-14 09:05:10

  Do you really understand C? 21st International Obfuscated C Code Contest winning entries

The 21st International Obfuscated C Code Contest(IOCCC) officially launched the winning source code. IOCCC requires contestants to write the most creative and the most obfuscated C codes with the size limited to 4kb and less Work of each participant is impressive. The winners, including one French, one Korean, five Americans, one Belgian, one Israeli, one British, four Japanese and one Chinese. Here we list some codes: Best short program Seonghoon Kang  from Korea- Decodes spelled out ...

   C,Obsfucation contest     2012-10-25 12:26:55

  HeartBleed: Inside the heart, what causes the bleeding?

Just after a few weeks since Apple's famous goto fail bug, there is one bug in OpenSSL which catches the attention from the world again. The bug is named HeartBleed, found in OpenSSL library, a famous open source library supporting lots of  SSL/TLS communication among server/client applications. The reason why this bug catches the attentions from the world is it affects almost all sites which are using the affected OpenSSL library, these includes many applications like Nginx server, some v...

   OpenSSL,HeartBleed     2014-04-09 05:47:30

  HeartBleed: Should C be blamed for the HeartBleed bug?

There is a discussion about the security of applications written in C on Hacker News recently after the report of HeartBleed bug in OpenSSL. In this discussion, some people are saying that the applications written in C are unsafe. It seems all or most of the faults should be laid on C. I think this is biased. The language itself should not be blamed.Safety is a relative term for programming languages. No language is absolutely safe. We claim some languages like Java and C# are safer than C/C++ b...

   C,HeartBleed,Analysis,Code review     2014-04-14 03:52:55

  C++ 11 Memory Management

Enterprise development and networking specialist Stephen B. Morris illustrates how to handle a classic C/C++ problem by using the new features in C++ 11 in conjunction with more established techniques.Memory management has always been one of the most error-prone areas of C++. The same is true of C. One of the strengths of managed languages, such as Java and C#, is their support for automatic garbage collection. Garbage collection still isn't a feature of C++ 11, so we must still be caref...

   C++ 11,Memory management,GC,Memory leak     2012-01-10 01:14:59