Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
dmitry-lipetsk opened this issue Nov 18, 2023 · 0 comments

Comments

@dmitry-lipetsk
Copy link
Contributor

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants