title: how to fix bug due to a heap corruption
body: <p>I have the following callstak when my application crash (create via MSVC210 save dump feature and winbdg in a second time with k command):</p>
  
  <pre><code>0012c720 7d684c89 0012c93c 7d656a16 063acab8 ntdll!DbgBreakPoint
  0012c728 7d656a16 063acab8 0000035c 035f0000 ntdll!RtlpBreakPointHeap+0x28
  0012c93c 7d685892 035f0000 50000161 0000035c ntdll!RtlAllocateHeapSlowly+0x231
  0012c9b0 7d65695e 035f0000 50000161 0000035c ntdll!RtlDebugAllocateHeap+0xaf
  0012cbcc 7d62ba89 035f0000 40000060 0000035c ntdll!RtlAllocateHeapSlowly+0x41
  0012cdfc 10308343 035f0000 40000060 0000035c ntdll!RtlAllocateHeap+0xe9f
  0012ce14 1031697c 0000035c c8fa7bd5 0012deb0 MSVCR100D!_heap_alloc_base+0x53
  0012ce5c 1031671f 00000338 00000001 00000000 MSVCR100D!_nh_malloc_dbg+0x2dc
  0012ce7c 103166cc 00000338 00000000 00000001 MSVCR100D!_nh_malloc_dbg+0x7f
  0012cea4 10319c5b 00000338 00000000 00000001 MSVCR100D!_nh_malloc_dbg+0x2c
  0012cec4 10307db1 00000338 04f26388 0012cfac MSVCR100D!malloc+0x1b
  0012cee0 65302a58 00000338 c8876569 00000070 MSVCR100D!operator new+0x11
  </code></pre>
  
  <p>It seems this is due to a heap corruption.</p>
  
  <p>I don't know how or what look for in my code to fix the bug..</p>
  
  <p>Is there any best practices to fix this king og bug ?</p>
  
  <p>Thanks a lot</p>