Good catch! I didn't realize it was that easy.
On a Mac you need to right-click to "Show Package Contents" of your app:
Then copy malloc.c to the folder as shown:
On Windows, it will be something like this (depending where you installed the Arduino app):
In case the linked site goes down, I made a copy (right-click and "Save Link As ..."):http://gammon.com.au/Arduino/malloc.c
// This sketch will crash after about three iterations.
// It's caused by the malloc bug in the String library
} // end of setup
int n = 0;
while (n <= 100)
int u = 20 * n;
int v = 30 * n;
String str = String (n) + ", " + String (u) + ", " + String (v);
} // end of loop