blob: 909af71457fc3f971597303dcd58b4279d76895f [file] [log] [blame]
// RUN: test.sh -e -t %t %s
// Concatenate onto a destination string that is too short.
// This should cause an error that should be caught.
#include <string.h>
void do_cat(const char *src)
{
char dest[10] = "";
strcat(dest, src);
}
int main()
{
char str[] = "This is over 10.";
do_cat(str);
return 0;
}