AGREP - approximate GREP for fast fuzzy string searching. Files are searched for a string or regular expression, with approximate matching capabilities and user-definable records. Developed 1989-1991 by Udi Manber, Sun Wu et al. at the University of Arizona. ISC open source license since Sept. 2014.
I suggest using Coverity Scan for the agrep code to detect more code issues similar to those reported in pull request #13.
See this Leptonica issue for a similar request. Here is the result.