summaryrefslogtreecommitdiff
path: root/src/or/control.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-06-05 14:28:47 +0000
committerNick Mathewson <nickm@torproject.org>2005-06-05 14:28:47 +0000
commit9f24078452d53b859d15e032b3aa88f244da8ecd (patch)
treea5a81f61367df3283dd0fc22de75ed1c5f270f1d /src/or/control.c
parent8666f07f65d4d880596221e5be3afcacdc6851fc (diff)
downloadtor-9f24078452d53b859d15e032b3aa88f244da8ecd.tar.gz
tor-9f24078452d53b859d15e032b3aa88f244da8ecd.zip
Fix buffer overlow when checking hashed passwords
svn:r4308
Diffstat (limited to 'src/or/control.c')
-rw-r--r--src/or/control.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/control.c b/src/or/control.c
index 564bb1b396..80ad6a33b3 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -481,7 +481,7 @@ decode_hashed_password(char *buf, const char *hashed)
}
}
if (buf)
- memcpy(buf, decoded, sizeof(decoded));
+ memcpy(buf, decoded, S2K_SPECIFIER_LEN+DIGEST_LEN);
return 0;
}