Skip to content

Commit

Permalink
fix two compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarning committed Mar 12, 2019
1 parent 27c4afe commit 2904b76
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/http_microhttpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,6 @@ static int preauthenticated(struct MHD_Connection *connection,
char *querystr = NULL;
char query_str[QUERYMAXLEN] = {0};
char *query = query_str;
struct MHD_Response *response;
int ret;
s_config *config = config_get_config();

Expand Down Expand Up @@ -873,7 +872,7 @@ static int get_query(struct MHD_Connection *connection, char **query, const char
free(elements[i]);
}

strncpy(*query, query_str, sizeof(query_str));
strncpy(*query, query_str, QUERYMAXLEN);
free(elements);
return 0;
}
Expand Down

0 comments on commit 2904b76

Please sign in to comment.