Fixes to Coverity defects.

This commit is contained in:
Markus Makela
2015-06-25 06:01:33 +03:00
parent 62b951e66e
commit e5d9abbdcb
5 changed files with 29 additions and 66 deletions

View File

@ -228,6 +228,12 @@ unsigned int randval;
MAXKEYS key;
char secret_file[PATH_MAX + 10];
if(strlen(path) > PATH_MAX)
{
skygw_log_write(LOGFILE_ERROR,"Error: Pathname too long.");
return 1;
}
sprintf(secret_file,"%s/.secrets",path);
/* Open for writing | Create | Truncate the file for writing */