From 3a38623dccd6039ece496399d75a00485c341ea8 Mon Sep 17 00:00:00 2001 From: Jose Marcial Vieira Bisneto Date: Wed, 1 Mar 2017 14:28:17 -0300 Subject: [PATCH] Fixed key length validation. --- importer/resolver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/importer/resolver.c b/importer/resolver.c index 89b11f2..4d24927 100644 --- a/importer/resolver.c +++ b/importer/resolver.c @@ -137,7 +137,7 @@ struct Node* ipfs_resolver_remote_get(const char* path, struct Node* from, const id[id_size] = 0; char* key = &pos[1]; pos = strchr(key, '/'); - if (pos == NULL || pos - temp > 254) + if (pos == NULL || pos - key > 254) return NULL; pos[0] = '\0'; // get the multiaddress for this