mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 01:23:03 +01:00
Fixed CORE-1506: Server crash with isc_dsql_execute_immediate and zero length string
This commit is contained in:
parent
185ff6f40a
commit
79f97a1534
@ -1090,6 +1090,13 @@ static void execute_immediate(thread_db* tdbb,
|
||||
|
||||
try {
|
||||
|
||||
if (!string) {
|
||||
ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) <<
|
||||
// Unexpected end of command
|
||||
// CVC: Nothing will be line 1, column 1 for the user.
|
||||
Arg::Gds(isc_command_end_err2) << Arg::Num(1) << Arg::Num(1));
|
||||
}
|
||||
|
||||
if (!length) {
|
||||
length = strlen(string);
|
||||
}
|
||||
@ -2491,6 +2498,13 @@ static dsql_req* prepare(thread_db* tdbb, dsql_dbb* database, jrd_tra* transacti
|
||||
Arg::Gds(isc_wish_list));
|
||||
}
|
||||
|
||||
if (!string) {
|
||||
ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) <<
|
||||
// Unexpected end of command
|
||||
// CVC: Nothing will be line 1, column 1 for the user.
|
||||
Arg::Gds(isc_command_end_err2) << Arg::Num(1) << Arg::Num(1));
|
||||
}
|
||||
|
||||
if (!string_length)
|
||||
string_length = strlen(string);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user