Fixed Coverity defects

This commit is contained in:
Markus Makela
2015-07-14 16:17:50 +03:00
parent aa92b31ef1
commit 3992f262ca
7 changed files with 37 additions and 28 deletions

View File

@ -671,7 +671,7 @@ blr_cache_response(ROUTER_INSTANCE *router, char *response, GWBUF *buf)
char path[PATH_MAX+1], *ptr;
int fd;
strcpy(path,get_datadir());
strncpy(path,get_datadir(),PATH_MAX);
strncat(path,"/",PATH_MAX);
strncat(path, router->service->name, PATH_MAX);
@ -706,7 +706,7 @@ char path[PATH_MAX+1], *ptr;
int fd;
GWBUF *buf;
strcpy(path, get_datadir());
strncpy(path, get_datadir(),PATH_MAX);
strncat(path, "/", PATH_MAX);
strncat(path, router->service->name, PATH_MAX);
strncat(path, "/.cache/", PATH_MAX);