diff options
author | Tharanga Gamaethige <tgamaethige@netflix.com> | 2019-05-17 18:13:30 -0700 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2019-05-20 13:24:20 -0700 |
commit | 43c0c37ba66ba10b6d58788d2d86cc7481cb3c6f (patch) | |
tree | a67edeec48d30012a93512e647a21d82b7ff1b03 /util.c | |
parent | b1425dcb62f98ee20f5be68d0d95e78dfd9c993f (diff) | |
download | memcached-43c0c37ba66ba10b6d58788d2d86cc7481cb3c6f.tar.gz |
Use correct buffer size for internal URI encoding.
Modified Logger and Crawler to use the correct buffer length when
they are printing URI encoded keys. Fixes #471
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -29,7 +29,7 @@ bool uriencode(const char *src, char *dst, const size_t srclen, const size_t dst int x; size_t d = 0; for (x = 0; x < srclen; x++) { - if (d + 4 >= dstlen) + if (d + 4 > dstlen) return false; if (uriencode_map[(unsigned char) src[x]] != NULL) { memcpy(&dst[d], uriencode_map[(unsigned char) src[x]], 3); |