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 infinite loop bug. #182

Closed
wants to merge 1 commit into from
Closed

Fix infinite loop bug. #182

wants to merge 1 commit into from

Commits on Mar 9, 2018

  1. Fix infinite loop bug.

    If the parameter, old is an empty string for some reason, conditions of both for
    loops will be never finished. To fix the bug, added one more condition
    that if oldlen is 0, loops never run.
    
    from: (q = strstr(p, old)) != NULL
    to  : (oldlen != 0) && (q = strstr(p, old)) != NULL
    
    Edited:     src/as-utils.c
    memnoth committed Mar 9, 2018