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

fix some bug #76

Open
wants to merge 5 commits into
base: llvm-4.0
Choose a base branch
from
Open

fix some bug #76

wants to merge 5 commits into from

Conversation

xelzmm
Copy link

@xelzmm xelzmm commented Jul 21, 2017

Let's suppose splitN is equal to curr.size(), and size of vector<int> test is always curr.size() - 1(value from 1 to size-1, and index from 0 to size-2).

Then the i-for-loop will produce a index splitN - 1, aka size-1 as the last item, which will excceed the bounds of vector<int> test.

Accessing test[i] will be undefined behavior and will return unexpected value(e.g. 268435456). This would cause j and it iterates within a huge range.

Actually no memory issues but really costs CPU and wastes time.

@xelzmm xelzmm changed the title fix split out of bounds bug fix some bug Aug 27, 2017
@xelzmm
Copy link
Author

xelzmm commented Aug 28, 2017

add bcf bugfix

PatriceBlin pushed a commit to eshard/obfuscator-llvm that referenced this pull request May 9, 2022
Upstream-Status: Pending merge request
This patch will probably never be upstreamed.

see: obfuscator-llvm/obfuscator#76
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