From 7d674d9dcf229e72fb2278a389a51955fc4e97e2 Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Thu, 23 Jun 2011 18:12:56 +0200 Subject: [PATCH] bugfix: off-by-one in query option --- uri.c | 1 + 1 file changed, 1 insertion(+) diff --git a/uri.c b/uri.c index 0f198404..9fe90d3a 100644 --- a/uri.c +++ b/uri.c @@ -154,6 +154,7 @@ coap_split_uri(unsigned char *str_var, size_t len, coap_uri_t *uri) { /* Uri_Query */ if (len && *p == '?') { ++p; + --len; COAP_SET_STR(&uri->query, len, p); len = 0; }