blob: c4c38bf624e518f66eba5930a0d388cfa3e58905 [file] [log] [blame]
/* sscanf() out of bounds */
#include <stdio.h>
#include <string.h>
void poor_mans_strcpy(char *dst, char *src)
{
sscanf(dst, "%s", src);
}
int main()
{
char buf1[50], buf2[100];
memset(buf2, 'a', 99);
buf2[99] = '\0';
poor_mans_strcpy(buf1, buf2);
return 0;
}