Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix bug where ldid would hang if the binary was already signed #5

Merged
merged 1 commit into from

2 participants

@gh2o

The _foreach macro contains a bug in which if "break" is called in the inner loop, the look would restart, possibly causing the loop to recur forever and hanging the program.

Specifically, if using "ldid -S" on a binary that is already signed, the "break" at ldid.cpp:640 would cause that loop to loop infinitely.

@rpetrich rpetrich merged commit 420ff4f into rpetrich:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 6, 2012
  1. fix bug in _foreach in which a "break" in the inner loop would cause …

    gh2o authored
    …the loop to restart
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  minimal/stdlib.h
View
2  minimal/stdlib.h
@@ -115,7 +115,7 @@ struct Iterator_ {
for (bool _stop(true); _stop; ) \
for (const __typeof__(list) &_list = (list); _stop; _stop = false) \
for (Iterator_<__typeof__(list)>::Result _item = _list.begin(); _item != _list.end(); ++_item) \
- for (bool _suck(true); _suck; ) \
+ for (bool _suck(true); _suck; _suck = false) \
for (const __typeof__(*_item) &item = *_item; _suck; _suck = false)
#endif
Something went wrong with that request. Please try again.