title: C - read string from buffer of certain size
body: <p>I have a <code>char buf[x]</code>, <code>int s</code> and <code>void* data</code>.</p>
  <p>I want to write a string of size <code>s</code> into <code>data</code> from <code>buf</code>.</p>
  <p>How can I accomplish it?</p>
  <p>Thanks in advance.</p>