aboutsummaryrefslogtreecommitdiff
path: root/util/uri.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/uri.c')
-rw-r--r--util/uri.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/util/uri.c b/util/uri.c
index 8624a7a..8bdef84 100644
--- a/util/uri.c
+++ b/util/uri.c
@@ -52,6 +52,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/cutils.h"
#include "qemu/uri.h"
@@ -2266,10 +2267,7 @@ struct QueryParams *query_params_parse(const char *query)
/* Find the next separator, or end of the string. */
end = strchr(query, '&');
if (!end) {
- end = strchr(query, ';');
- }
- if (!end) {
- end = query + strlen(query);
+ end = qemu_strchrnul(query, ';');
}
/* Find the first '=' character between here and end. */