Fix use of strncpy using the entire size of the buffer. You have to -1 for the null char

pull/2916/head
Isaac Connor 2020-04-14 17:01:50 -04:00
parent 17356a7b3a
commit c50509d22a
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ int main(int argc, const char *argv[]) {
Debug(1, "Query: %s", query);
char temp_query[1024];
strncpy(temp_query, query, sizeof(temp_query));
strncpy(temp_query, query, sizeof(temp_query)-1);
char *q_ptr = temp_query;
char *parms[16]; // Shouldn't be more than this
int parm_no = 0;