According To Microsoft: The system detected an invalid address used as an argument of a call. This error can occur if the length of the buffer is too small.
Resolution:
Verify the return value from a memory allocation to be sure it succeeded. Always be sure to allocate enough space.