summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorCristian Toader <cristian.matei.toader@gmail.com>2013-09-06 12:26:50 +0300
committerCristian Toader <cristian.matei.toader@gmail.com>2013-09-06 12:26:50 +0300
commit42f5737c810622bd1e83caffd27c25908e862597 (patch)
tree7271411b4d84787173a5f129619b9fc4bea3faa1 /src/common
parent55d8b8e578e17d8654f33f62fdc4a4419a6b92a7 (diff)
downloadtor-42f5737c810622bd1e83caffd27c25908e862597.tar.gz
tor-42f5737c810622bd1e83caffd27c25908e862597.zip
switched string lengths from int to size_t in prot_strings()
Diffstat (limited to 'src/common')
-rw-r--r--src/common/sandbox.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/sandbox.c b/src/common/sandbox.c
index 19c28981ed..b4189b5df6 100644
--- a/src/common/sandbox.c
+++ b/src/common/sandbox.c
@@ -696,7 +696,7 @@ static int
prot_strings(sandbox_cfg_t* cfg)
{
int ret = 0;
- int pr_mem_size = 0, pr_mem_left = 0;
+ size_t pr_mem_size = 0, pr_mem_left = 0;
char *pr_mem_next = NULL, *pr_mem_base;
sandbox_cfg_t *el = NULL;
@@ -721,7 +721,7 @@ prot_strings(sandbox_cfg_t* cfg)
// change el value pointer to protected
for (el = cfg; el != NULL; el = el->next) {
char *param_val = (char*)((smp_param_t *)el->param)->value;
- int param_size = strlen(param_val) + 1;
+ size_t param_size = strlen(param_val) + 1;
if (pr_mem_left - param_size >= 0) {
// copy to protected