Fixed key length validation.

yamux
Jose Marcial Vieira Bisneto 2017-03-01 14:28:17 -03:00
parent f1aac5d707
commit 3a38623dcc
1 changed files with 1 additions and 1 deletions

View File

@ -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