Fix potential buffer overrun vulnerability
Fix potential buffer overrun vulnerability

An off by one error could lead the cdbc_prepare function to create
a unterminated string as a copy of the user provided query string.

Subsequent use of this string copy would lead the application to
access memory it does not have access to causing a segmentation fault.

fnordahl/cdbc,fnordahl/cdbc