diff options
author | Cœur <coeur@gmx.fr> | 2023-03-02 13:59:32 +0800 |
---|---|---|
committer | Azat Khuzhin <azat@libevent.org> | 2023-03-02 07:32:17 +0100 |
commit | 3bcc92cf59cf9bd20d54f13d3a5f0fe51d029e81 (patch) | |
tree | 34f0b35198207034761de43340c9103e189d8a75 | |
parent | b84fee24abdeccf70748f6387a056057ec6ce882 (diff) | |
download | libevent-3bcc92cf59cf9bd20d54f13d3a5f0fe51d029e81.tar.gz |
Fix the value is never actually read from 'argument' in evhttp_parse_query_impl()
Although the value stored to 'argument' is used in the enclosing
expression, the value is never actually read from 'argument'
-rw-r--r-- | http.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -3555,7 +3555,6 @@ evhttp_parse_query_impl(const char *str, struct evkeyvalq *headers, int is_whole_uri, unsigned flags) { char *line=NULL; - char *argument; char *p; const char *query_part; int result = -1; @@ -3583,13 +3582,12 @@ evhttp_parse_query_impl(const char *str, struct evkeyvalq *headers, goto error; } - p = argument = line; + p = line; while (p != NULL && *p != '\0') { char *key, *value, *decoded_value; int err; - argument = strsep(&p, "&"); - value = argument; + value = strsep(&p, "&"); key = strsep(&value, "="); if (flags & EVHTTP_URI_QUERY_NONCONFORMANT) { if (value == NULL) |