title: Builtin MemCpy Chk will always overflow destination buffer
body: <p>Updating my app from 32-bit to 64-bit.</p>
  
  <p>According to the Apple Documentation floats are only 4 byte and I need to use CGFloat (8 byte) </p>
  
  <p>I am using the <code>memcpy</code> to read in bytes. I have updated all my <code>sizeof(float)</code>s to <code>sizeof(CGFloat)</code>.</p>
  
  <p>But when I do I get the Semantic issue </p>
  
  <blockquote>
    <p><em>__builtin___memcpy_chk will always overflow destination buffer. Expanded from macro <code>memcpy</code></em></p>
  </blockquote>
  
  <p>I updated my <code>NSData readDataOfLenght</code> to take <code>sizeof(CGFloat)</code> and it seems to work ok. Sometimes not all the data that is read in is correct.</p>
  
  <p><strong><em>I am afraid I am over my head in this and could use some help.</em></strong></p>
  
  <pre><code>-(void) readByteData:(NSFileHandle *)fHandle Size:(NSInteger)byteSize
  {
      [super readByteData:fHandle Size:byteSize];
  
      NSData *data = [fHandle readDataOfLength:sizeof(CGFloat)];
      float r;
      memcpy(&amp;r, [data bytes], sizeof(CGFloat));
      self.radius = r;
  
      int nCGPointSize = sizeof(CGFloat) * 2;
      data = [fHandle readDataOfLength:nCGPointSize];
      float xy[2];
      memcpy(xy, [data bytes], nCGPointSize);
      self.centerPos = ccp(xy[0], xy[1]);
  
      data = [fHandle readDataOfLength:sizeof(CGFloat)];
      float start_angle;
      memcpy(&amp;start_angle, [data bytes], sizeof(CGFloat));
      self.startAngle = start_angle;
  
      data = [fHandle readDataOfLength:sizeof(CGFloat)];
      float end_angle;
      memcpy(&amp;end_angle, [data bytes], sizeof(CGFloat));
      self.endAngle = end_angle;
  
      data = [fHandle readDataOfLength:sizeof(int)];
      int d;
      memcpy(&amp;d, [data bytes], sizeof(int));
      self.dir = d;
  
      flagClosed = YES;
  }
  </code></pre>