summaryrefslogtreecommitdiffstats
path: root/mbbsd/emaildb.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/emaildb.c')
-rw-r--r--mbbsd/emaildb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mbbsd/emaildb.c b/mbbsd/emaildb.c
index a5ff2ee7..c9313baf 100644
--- a/mbbsd/emaildb.c
+++ b/mbbsd/emaildb.c
@@ -89,6 +89,11 @@ end:
if (Db != NULL)
sqlite3_close(Db);
+ // XXX exit() can only hold 0~255 for WEXISTSTATUS
+ assert(127 >= EMAILDB_LIMIT);
+ if (count > 127)
+ count = 127;
+
if (pid == 0)
exit(count);