Those checks all look good.  The only thing I had a question
about is the:

    len = strlen(sym);

Would it be better to use memchr to search for the NUL terminator
to avoid going past the end?  E.g.

    if (memchr(sym, 0, left) == NULL)
        continue;

 - todd

Reply via email to