I changed the code to actually reflect the git tag lookup semantics and only make use of standard c string functions.