uri.c: Fix oss-fuzz issue 48362

Introduced by fix #818 Feb 7 2022.
This commit is contained in:
Jon Shallow authored and obgm committed 2022-10-05 09:22:50 +02:00
1 parent 6a633e3d49
commit c0572443dc
1 file changed
+1 -1
+1 -1
View File
@@ -61,7 +61,7 @@ coap_split_uri_sub(const uint8_t *str_var,
int is_http_proxy_scheme = 0;
size_t keep_len = len;
if (!str_var || !uri)
if (!str_var || !uri || len == 0)
return -1;
memset(uri, 0, sizeof(coap_uri_t));