diff options
-rw-r--r-- | client/mysqltest.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 8107bd03a3b..3e6a86d17bd 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -3630,9 +3630,12 @@ void do_system(struct st_command *command) /* returns TRUE if path is inside a sandbox */ bool is_sub_path(const char *path, size_t plen, const char *sandbox) { - size_t len= strlen(sandbox); - if (!sandbox || !len || plen <= len || memcmp(path, sandbox, len - 1) - || path[len] != '/') + size_t len; + if (!sandbox) + return false; + else + len= strlen(sandbox); + if (plen <= len || memcmp(path, sandbox, len - 1) || path[len] != '/') return false; return true; } @@ -11888,7 +11891,7 @@ void dynstr_append_sorted(DYNAMIC_STRING* ds, DYNAMIC_STRING *ds_input, /* Sort array */ qsort(lines.buffer, lines.elements, - sizeof(char**), (qsort_cmp)comp_lines); + sizeof(uchar *), (qsort_cmp)comp_lines); /* Create new result */ for (i= 0; i < lines.elements ; i++) |