Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated the Visual Studio version after testing with MSVC 11

...

If this noncompliant code is compiled with GCC 3.4.6 and linked with libc 2.3.4, invoking realloc(p, 0) returns a non-null pointer to a zero-sized object (the same as malloc(0)). However, if the same code is compiled with either Microsoft Visual Studio 7.1 or GCC 4.1.0 , realloc(p, 0) returns a null pointer, resulting in a double-free vulnerability.

...