8000 Problem: Array out of bounds access during transform by arajkumar · Pull Request #809 · dimitri/pgcopydb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Problem: Array out of bounds access during transform #809

8000
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

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

arajkumar
Copy link
Contributor
@arajkumar arajkumar commented Jun 7, 2024

The logic which removes redundant SET for columns who's value is same as in WHERE clause accesses oldValue using newValue index. Both can have varying size items causing out of bound access.

We use the correct index to access the old column name, but incorrect index has been used to access the old column value.

Original PR which avoids redundant SET if value is same as in WHERE: #333

Solution: Use old column index to access it's value

The logic which removes redundant SET for columns who's value is same as
in WHERE clause accesses oldValue using newValue index. Both can have
varying size items causing out of bound access.

We use the correct index to access the old column name, but incorrect index
has been used to access the old column value.

Solution: Use old column index to access it's value

Signed-off-by: Arunprasad Rajkumar <ar.arunprasad@gmail.com>
@arajkumar arajkumar force-pushed the arajkumar/array-of-bounds-txf branch from b075eb5 to 6bd34a9 Compare June 7, 2024 10:27
@dimitri dimitri merged commit f667d46 into dimitri:main Jun 7, 2024
19 checks passed
@dimitri dimitri added the bug Something isn't working label Jun 7, 2024
@dimitri dimitri added this to the v0.17 milestone Jun 7, 2024
@dimitri
Copy link
Owner
dimitri commented Jun 7, 2024

Thanks @arajkumar ; well spotted!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0