Commit f3533fca authored by Mike Hibler's avatar Mike Hibler

Doh! For jailconfig we could deref a null pointer.

Apparently we don't always set interfaces.mask in the DB for the cnet
interface. So the mysql query returns NULL, which we would happily strcpy!
Now we use CONTROL_NETMASK if the queried value is null.
parent a40cf5e6
......@@ -7273,7 +7273,7 @@ COMMAND_PROTOTYPE(dojailconfig)
row = mysql_fetch_row(res);
if (row[3]) {
strcpy(jailip, row[3]);
strcpy(jailipmask, row[4]);
strcpy(jailipmask, (row[4] ? row[4] : CONTROL_NETMASK));
}
else if (row[1]) {
strcpy(jailip, row[1]);
......
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