aboutsummaryrefslogtreecommitdiff
path: root/src/or/rendcommon.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-04-03 03:39:31 +0000
committerNick Mathewson <nickm@torproject.org>2004-04-03 03:39:31 +0000
commitcb07e2ad2762cb2d7a4800b4b140459a0822e531 (patch)
tree0564abd39ce3ab60259b7bc3bca27848e972a4e5 /src/or/rendcommon.c
parentd93ff0b82f9c4a983677cddf02d43b40f801d1a0 (diff)
downloadtor-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.c3
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;