8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 06:43:04 +01:00

Backported fix for CORE-1506: Server crash with isc_dsql_execute_immediate and zero length string

This commit is contained in:
alexpeshkoff 2008-09-09 09:28:25 +00:00
parent 2834254f4e
commit 46a586964d

View File

@ -661,6 +661,13 @@ static ISC_STATUS dsql8_execute_immediate_common(ISC_STATUS* user_status,
try {
if (!string) {
ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 104,
isc_arg_gds, isc_command_end_err2,
// CVC: Nothing will be line 1, column 1 for the user.
isc_arg_number, (SLONG) 1, isc_arg_number, (SLONG) 1,
isc_arg_end); // Unexpected end of command
}
if (!length) {
length = strlen(string);
}
@ -4587,6 +4594,14 @@ static dsql_req* prepare(
ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 901,
isc_arg_gds, isc_wish_list, isc_arg_end);
if (!string) {
ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 104,
isc_arg_gds, isc_command_end_err2,
// CVC: Nothing will be line 1, column 1 for the user.
isc_arg_number, (SLONG) 1, isc_arg_number, (SLONG) 1,
isc_arg_end); // Unexpected end of command
}
if (!string_length)
string_length = strlen(string);