Fixes to Coverity bugs:

72743
73407
73408
73409
73415
73419
This commit is contained in:
Markus Makela
2014-11-06 15:40:11 +02:00
parent 8925f79286
commit c4d51f54cd
7 changed files with 29 additions and 21 deletions

View File

@ -269,7 +269,7 @@ int result = 0;
char *home, buf[1024];
/* Unlink any existing password file before running this test */
if ((home = getenv("MAXSCALE_HOME")) == NULL)
if ((home = getenv("MAXSCALE_HOME")) == NULL || strlen(home) >= 1024)
home = "/usr/local/skysql";
sprintf(buf, "%s/etc/passwd", home);
if (strcmp(buf, "/etc/passwd") != 0)