Code:
char pth[10] ="\\\\.\\";
strcat(pth,path);
pth is only 10 long... how long is path ?