mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 10:03:03 +01:00
Fix for CORE-1051: Possible stack corruption in DFW\check_dependencies
This commit is contained in:
parent
0c4ccc148e
commit
a810712c6e
@ -1232,8 +1232,8 @@ static void check_dependencies(thread_db* tdbb,
|
||||
Database* dbb = tdbb->tdbb_database;
|
||||
|
||||
int i;
|
||||
SLONG dep_counts[obj_count];
|
||||
for (i = 0; i < obj_count; i++)
|
||||
SLONG dep_counts[obj_type_MAX];
|
||||
for (i = 0; i < obj_type_MAX; i++)
|
||||
dep_counts[i] = 0;
|
||||
|
||||
if (field_name)
|
||||
@ -1293,7 +1293,7 @@ static void check_dependencies(thread_db* tdbb,
|
||||
REQUEST(irq_ch_dpd) = request;
|
||||
}
|
||||
|
||||
for (i = 0; i < obj_count; i++) {
|
||||
for (i = 0; i < obj_type_MAX; i++) {
|
||||
if (dep_counts[i])
|
||||
{
|
||||
ISC_STATUS obj_type;
|
||||
|
@ -38,7 +38,7 @@ const int obj_exception = 7;
|
||||
const int obj_user = 8;
|
||||
const int obj_field = 9;
|
||||
const int obj_index = 10;
|
||||
const int obj_count = 11;
|
||||
// const int obj_count = 11;
|
||||
const int obj_user_group = 12;
|
||||
const int obj_sql_role = 13;
|
||||
const int obj_generator = 14;
|
||||
@ -46,5 +46,8 @@ const int obj_udf = 15;
|
||||
const int obj_blob_filter = 16;
|
||||
const int obj_collation = 17;
|
||||
|
||||
// keep this last !
|
||||
const int obj_type_MAX = 18;
|
||||
|
||||
#endif /* JRD_OBJ_H */
|
||||
|
||||
|
@ -79,7 +79,7 @@ TYPE ("EXCEPTION", obj_exception, nam_obj_type)
|
||||
TYPE ("USER", obj_user, nam_obj_type)
|
||||
TYPE ("FIELD", obj_field, nam_obj_type)
|
||||
TYPE ("INDEX", obj_index, nam_obj_type)
|
||||
TYPE ("DEPENDENT_COUNT", obj_count, nam_obj_type)
|
||||
// TYPE ("DEPENDENT_COUNT", obj_count, nam_obj_type)
|
||||
TYPE ("USER_GROUP", obj_user_group, nam_obj_type)
|
||||
TYPE ("ROLE", obj_sql_role, nam_obj_type)
|
||||
TYPE ("GENERATOR", obj_generator, nam_obj_type)
|
||||
|
Loading…
Reference in New Issue
Block a user