ovsdb-server: Fix null pointer deref when bool "is_connected" is empty.
The ovsdb-server supports obtaining its remote connection targets from a
database table and updating that table with connection status information.
One of the supported connection status columns is a boolean column named
"is_connected". The code in ovsdb-server blindly assigned a bool into
this column without checking that it actually had space allocated for one.
This was and is fine with the ovs-vswitchd schema, which always has exactly
one value in this column. However, if a database schema makes this column
optional, and there are actually no values in it, then this assignment
dereferences a null pointer.
This commit fixes the problem by allocating space for a bool if none has
yet been allocated.
Noticed while adding an extra test for the connection status feature.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>