Fix core dump if no connection attributes available.

Reported in https://github.com/mcafee/mysql-audit/issues/161.
pull/179/head
Arnold Robbins 2017-02-23 12:03:58 +02:00
parent ba21262b81
commit 570bfb0de6
1 changed files with 7 additions and 1 deletions

View File

@ -392,7 +392,13 @@ public:
//no offsets - return null
return NULL;
}
return *(const char **) (((unsigned char *) pfs) + Audit_formatter::thd_offsets.pfs_connect_attrs);
const char **pfs_pointer = (const char **) (((unsigned char *) pfs) + Audit_formatter::thd_offsets.pfs_connect_attrs);
if (pfs_pointer == NULL)
{
return NULL;
}
return *pfs_pointer;
}
static inline uint pfs_connect_attrs_length(void * pfs)