title: copy allocated char array to "normal" char array
body: <p>Please, tell me, what is the correct way of copying allocated char array to "normal" char array?
  I have attempted to do the following, but it fails :</p>
  
  <pre><code>char * buf = (char *) malloc (BUFSIZ * sizeof(char));
  // filling up the allocated array with stuff...
  char temp[BUFSIZ];
  strcpy(temp, buf); // strcpy doesn't work
  </code></pre>