mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 14:51:11 +01:00
Strdup hates finding 0 bytes.
svn:r1465
This commit is contained in:
parent
d93ff0b82f
commit
cb07e2ad27
1 changed files with 2 additions and 1 deletions
|
@ -246,7 +246,8 @@ int rend_cache_store(char *desc, int desc_len)
|
|||
}
|
||||
e->parsed = parsed;
|
||||
e->len = desc_len;
|
||||
e->desc = tor_strdup(desc);
|
||||
e->desc = tor_malloc(desc_len);
|
||||
memcpy(e->desc, desc, desc_len);
|
||||
|
||||
log_fn(LOG_INFO,"Successfully stored rend desc '%s', len %d", query, desc_len);
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue