diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-04-03 03:39:31 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-04-03 03:39:31 +0000 |
commit | cb07e2ad2762cb2d7a4800b4b140459a0822e531 (patch) | |
tree | 0564abd39ce3ab60259b7bc3bca27848e972a4e5 /src/or/rendcommon.c | |
parent | d93ff0b82f9c4a983677cddf02d43b40f801d1a0 (diff) | |
download | tor-cb07e2ad2762cb2d7a4800b4b140459a0822e531.tar tor-cb07e2ad2762cb2d7a4800b4b140459a0822e531.tar.gz |
Strdup hates finding 0 bytes.
svn:r1465
Diffstat (limited to 'src/or/rendcommon.c')
-rw-r--r-- | src/or/rendcommon.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c index 83b19672f..f75a8182b 100644 --- a/src/or/rendcommon.c +++ b/src/or/rendcommon.c @@ -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; |