summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/or/tor_main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/tor_main.c b/src/or/tor_main.c
index af03b8c06a..65bb020c2c 100644
--- a/src/or/tor_main.c
+++ b/src/or/tor_main.c
@@ -27,6 +27,10 @@ int tor_main(int argc, char *argv[]);
int
main(int argc, char *argv[])
{
- return tor_main(argc, argv);
+ int r = tor_main(argc, argv);
+ if (r < 0 || r > 255)
+ return 1;
+ else
+ return r;
}