diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-12-13 18:38:19 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-12-13 18:38:19 +0000 |
commit | 8c85c0bef83b75cd5f6126aa9b258097b57bb574 (patch) | |
tree | cf4181e60511d830da731d96b1a6df5f3a716a85 /src/common | |
parent | 1e71b838904e44840f6f094104b740fc9c3a759f (diff) | |
download | tor-8c85c0bef83b75cd5f6126aa9b258097b57bb574.tar.gz tor-8c85c0bef83b75cd5f6126aa9b258097b57bb574.zip |
Note that length checking on base64_decode is kinda conservative
svn:r3144
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/crypto.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c index 66a666e943..104e8a56e9 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -1534,6 +1534,10 @@ base64_encode(char *dest, size_t destlen, const char *src, size_t srclen) * the result into <b>dest</b>, if it will fit within <b>destlen</b> * bytes. Return the number of bytes written on success; -1 if * destlen is too short, or other failure. + * + * NOTE: destlen should be a little longer than the amount of data it + * will contain, since we check for sufficient space conservatively. + * Here, "a little" is around 64-ish bytes. */ int base64_decode(char *dest, size_t destlen, const char *src, size_t srclen) |