Skip to content

Commit 7f2329f

Browse files
committed
fix: add check that trigger type was assigned a meaningful value
1 parent f4c7ab2 commit 7f2329f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/burp/restore.epp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9429,6 +9429,7 @@ bool get_trigger_old (BurpGlobals* tdgbl, burp_rel* relation)
94299429
att_type attribute;
94309430
TEXT name[GDS_NAME_LEN];
94319431
scan_attr_t scan_next_attr;
9432+
bool type_found = false;
94329433

94339434
STORE (REQUEST_HANDLE tdgbl->handles_get_trigger_old_req_handle1)
94349435
X IN RDB$TRIGGERS
@@ -9446,6 +9447,7 @@ bool get_trigger_old (BurpGlobals* tdgbl, burp_rel* relation)
94469447
{
94479448
case att_trig_type:
94489449
type = (enum trig_t) get_int32(tdgbl);
9450+
type_found = true;
94499451
break;
94509452

94519453
case att_trig_blr:
@@ -9470,6 +9472,12 @@ bool get_trigger_old (BurpGlobals* tdgbl, burp_rel* relation)
94709472
}
94719473
}
94729474

9475+
if(!type_found || type == trig_none)
9476+
{
9477+
BURP_error(136, true);
9478+
return false;
9479+
}
9480+
94739481
// fill in rest of attributes unique to new trigger format
94749482

94759483
TEXT* p = X.RDB$TRIGGER_NAME;

0 commit comments

Comments
 (0)