Skip to content

UDF compact div overflow fix#9025

Open
Ev3nt wants to merge 1 commit into
FirebirdSQL:masterfrom
Ev3nt:udf_compact_div_fix
Open

UDF compact div overflow fix#9025
Ev3nt wants to merge 1 commit into
FirebirdSQL:masterfrom
Ev3nt:udf_compact_div_fix

Conversation

@Ev3nt
Copy link
Copy Markdown
Contributor

@Ev3nt Ev3nt commented May 13, 2026

If you create a function that uses udf_compat!UC_div, then when it is called with parameters -2147483648 and -1, it will crash due to overflow. The problem is that the upper bound of int is 2147483647, so changing the sign causes a crash. n1 and n2 in in are int, so as a solution during the function call, you can cast them to long long.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant