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

[CBRD-25216] Check if there is enough buffer to store the user-specified name (#4946) #4955

Merged
merged 2 commits into from
Feb 20, 2024

Conversation

youngjinj
Copy link
Contributor

…ied name (CUBRID#4946)

http://jira.cubrid.org/browse/CBRD-25216

We found that the buffer of the pt_get_name_without_current_user_name function may be insufficient to copy the user-specified name. Also, we found that if the name of the auto-increment serial exceeds 254 bytes, it is truncated to 254 bytes when the owner of the table changes. In debug mode, if the table name exceeds 222 bytes, an assertion occurs in sm_user_specified_name. To prevent this, there are the following changes:

1. Copy only the qualifier name from the user-specified name in the pt_get_name_without_current_user_name function.
2. Add sm_user_specified_name_for_serial function.
3. Check if there is enough buffer in sm_user_specified_name and sm_qualifier_name functions.
4. Do not truncate the length of the new serial name to 254 bytes in the au_change_serial_owner function.
5. Add a safe guard to sm_user_specified_name and sm_user_specified_name_for_serial.
@youngjinj youngjinj added this to the 11.3 patch 1 milestone Feb 19, 2024
@youngjinj youngjinj self-assigned this Feb 19, 2024
@youngjinj youngjinj changed the base branch from develop to release/11.3 February 19, 2024 03:18
@youngjinj youngjinj marked this pull request as ready for review February 20, 2024 06:33
@youngjinj youngjinj merged commit 8116483 into CUBRID:release/11.3 Feb 20, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants