10 December 2001
David Larochelle
9
SecurityFocus.com Example
•void func(char *str){                               char buffer[256];                            strncat(buffer, str, sizeof(buffer) - 1); return;
•}
char *strncat (char *s1, char *s2, size_t n)
  /*@requires maxSet(s1)
>=maxRead(s1) + n@*/
uninitialized array
Source: Secure Programming working document,
SecurityFocus.com