Nick Kralevich d13c2b1ba6 Fix unnecessary call to __strncpy_chk2
If "n" is smaller than the size of "src", then we'll
never read off the end of src. It makes no sense to call
__strncpy_chk2 in those circumstances.

For example, consider the following code:

int main() {
  char src[10];
  char dst[5];
  memcpy(src, "0123456789", sizeof(src));
  strncpy(dst, src, sizeof(dst));
  dst[4] = '\0';
  printf("%s\n", dst);
  return 0;
}

In this code, it's clear that the strncpy will never read off
the end of src.

Change-Id: I9cf58857a0c5216b4576d21d3c1625e2913ccc03
2013-09-27 13:21:24 -07:00
..
2010-12-06 12:05:11 +01:00
2013-07-11 16:21:32 -07:00
2013-09-24 16:45:01 -07:00
2013-08-13 14:30:59 -07:00
2011-09-28 12:17:34 -07:00
2013-01-11 16:44:15 -08:00
2013-06-18 13:07:18 -07:00
2010-01-15 15:57:02 -08:00
2012-09-13 16:54:57 -07:00
2009-03-03 19:28:35 -08:00
2013-02-07 09:40:16 -08:00
2009-03-03 19:28:35 -08:00
2010-01-15 15:01:44 -08:00
2013-06-05 18:05:36 -07:00
2010-06-11 14:39:39 -07:00
2012-09-04 14:11:28 +02:00