Skip to content

[FB1+, GBAK, Restore] The skip of att_functionarg_field_precision does not check RESTORE_format #7851

@dmitry-lipetsk

Description

@dmitry-lipetsk

Hello,

firebird/src/burp/restore.epp

Lines 4790 to 4792 in a0ff6b9

case att_functionarg_field_precision:
get_int32(tdgbl);
break;

void get_function_arg(BurpGlobals* tdgbl, bool skip_arguments)
{
....
    if (skip_arguments)
    {
        skip_init(&scan_next_attr);
        while (skip_scan(&scan_next_attr), get_attribute(&attribute, tdgbl) != att_end)
        {
            switch (attribute)
            {
....
              case att_functionarg_field_precision:
                get_int32(tdgbl);
                break;
....

This code must check the tdgbl->RESTORE_format and must look so:

			case att_functionarg_field_precision:
				if (tdgbl->RESTORE_format >= 6)
					get_int32(tdgbl);
				else
					bad_attribute(scan_next_attr, attribute, 90);
				break;

See others "case att_functionarg_field_precision" lines in get_function_arg function:

firebird/src/burp/restore.epp

Lines 4925 to 4933 in a0ff6b9

case att_functionarg_field_precision:
if (tdgbl->RESTORE_format >= 6)
{
X.RDB$FIELD_PRECISION.NULL = FALSE;
X.RDB$FIELD_PRECISION = (USHORT) get_int32(tdgbl);
}
else
bad_attribute(scan_next_attr, attribute, 90);
break;

firebird/src/burp/restore.epp

Lines 5109 to 5117 in a0ff6b9

case att_functionarg_field_precision:
if (tdgbl->RESTORE_format >= 6)
{
X.RDB$FIELD_PRECISION.NULL = FALSE;
X.RDB$FIELD_PRECISION = (USHORT) get_int32(tdgbl);
}
else
bad_attribute(scan_next_attr, attribute, 90);
break;

firebird/src/burp/restore.epp

Lines 5222 to 5227 in a0ff6b9

case att_functionarg_field_precision:
if (tdgbl->RESTORE_format >= 6)
get_int32(tdgbl);
else
bad_attribute(scan_next_attr, attribute, 90);
break;

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions