aboutsummaryrefslogtreecommitdiff
path: root/src/common/container.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-05-15 22:13:53 -0400
committerNick Mathewson <nickm@torproject.org>2011-05-15 22:13:53 -0400
commit83fe07d3f26aff703230305c9ff529592af32d4f (patch)
tree0a1922d9cc2258b686dc2d73b48491b6767b5390 /src/common/container.c
parentede102fd4675af8ac4060767f0348f3c93617e80 (diff)
downloadtor-83fe07d3f26aff703230305c9ff529592af32d4f.tar
tor-83fe07d3f26aff703230305c9ff529592af32d4f.tar.gz
Increase the length of the buffer in smartlist_string_num_isin().
This was harmless, since we only used this for checking for lists of port values, but it's the principle of the thing. Fixes 3175; bugfix on 0.1.0.1-rc
Diffstat (limited to 'src/common/container.c')
-rw-r--r--src/common/container.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/container.c b/src/common/container.c
index ca49cbb17..da44b7fe6 100644
--- a/src/common/container.c
+++ b/src/common/container.c
@@ -210,7 +210,7 @@ smartlist_string_isin_case(const smartlist_t *sl, const char *element)
int
smartlist_string_num_isin(const smartlist_t *sl, int num)
{
- char buf[16];
+ char buf[32]; /* long enough for 64-bit int, and then some. */
tor_snprintf(buf,sizeof(buf),"%d", num);
return smartlist_string_isin(sl, buf);
}