Commit aa765cce authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add null test to prevent capserver death when the DB is messed up

and a query returns a null where it ain't supposed to!
parent 7aa0446f
......@@ -220,8 +220,12 @@ main(int argc, char **argv)
}
if ((int)mysql_num_rows(res)) {
row = mysql_fetch_row(res);
tipown.uid = 0;
tipown.gid = atoi(row[0]);
if (row[0])
tipown.gid = atoi(row[0]);
else
tipown.gid = admingid;
}
else {
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment