Fixes to Coverity defects 85010 84878 72752 72742 72719 and 73418.

skygw_utils.cc: Added function is_valid_posix_path that checks if a path is POSIX-compliant.
This commit is contained in:
Markus Makela
2015-01-05 06:05:56 +02:00
parent b3d79f7273
commit ba009e5fd3
9 changed files with 36 additions and 16 deletions

View File

@ -3844,7 +3844,7 @@ static bool execute_sescmd_in_backend(
tmpbuf = scur->scmd_cur_cmd->my_sescmd_buf;
qlen = MYSQL_GET_PACKET_LEN((unsigned char*)tmpbuf->start);
memset(data->db,0,MYSQL_DATABASE_MAXLEN+1);
if(qlen > 0)
if(qlen > 0 && qlen < UINT_MAX)
strncpy(data->db,tmpbuf->start+5,qlen - 1);
}
/** Fallthrough */