title: Realloc Invalid Pointer in C
body: <p>This is a homework assignment so I don't want to post any code, but I'm pretty stumped with the bug that I have. </p>
  
  <p>Currently I have a array that has been malloced and am copying the pointer to the array. Now, I can memcpy and memmove with this array and that works fine. </p>
  
  <p>However, when I do a realloc with it an invalid pointer error comes up - and I have absolutely no idea why. </p>
  
  <p>Can anyone help? </p>