title: strncpy is replaced by __strncpy_chk and fails
body: <p>I have a statement</p>
  
  <pre><code>strncpy(&amp;data-&gt;m_bin-&gt;data,versionStr,data-&gt;m_bin-&gt;sizeData);
  </code></pre>
  
  <p>in my application which itself is fine and works well. Here data->m_bin->data is a char where the calling application ensures it is followed by a datablock which is large enough to keep all the data handed over by strncpy().</p>
  
  <p>But when I build this as release using GCC/Linux, this function crashes in __strncpy_chk(). So it seems my strncpy() was replaced by __strncpy_chk() using a wrong length for parameter s1.</p>
  
  <p>So how can I ensure __strncpy_chk() is called with the correct length for s1?</p>
  
  <p>Thanks!</p>