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

@ -175,7 +175,7 @@ bool parse_query (
len = MYSQL_GET_PACKET_LEN(data)-1; /*< distract 1 for packet type byte */
if (len < 1 || (query_str = (char *)malloc(len+1)) == NULL)
if (len < 1 || len >= SIZE_MAX - 1 || (query_str = (char *)malloc(len+1)) == NULL)
{
/** Free parsing info data */
parsing_info_done(pi);