Skip to content
Snippets Groups Projects
Commit 824135f3 authored by rswindell's avatar rswindell
Browse files

No longer using strncpy (requires target buffer be at least count bytes big),

using sprintf instead.
parent e09fdfe6
No related branches found
No related tags found
No related merge requests found
......@@ -407,7 +407,7 @@ BOOL DLLCALL fexistcase(char *path)
strncat(globme,tmp,MAX_PATH*4);
}
if(strcspn(path,"?*")!=strlen(path)) {
strncpy(path,globme,MAX_PATH);
sprintf(path,"%.*s",MAX_PATH,globme);
return(fexist(path));
}
......@@ -428,7 +428,7 @@ BOOL DLLCALL fexistcase(char *path)
break;
}
if(i<glb.gl_pathc) {
strncpy(path,glb.gl_pathv[i],MAX_PATH);
sprintf(path,"%.*s",MAX_PATH,glb.gl_pathv[i]);
globfree(&glb);
return TRUE;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment