This is documentation issue.
Comment in UriStringToWindowsFilename function declaration states:
The destination buffer must be large enough to hold len(uriString) + 1 - 8
But in worst case (absolute URI pointing to Windows network with authority, no percent encoding, e.g. "file://Server01/Letter.txt") it must be len(uriString) + 1 - 5, what unfortunately may lead to heap corruption for those who read the docs.
Hi Nick,
thanks for the report! Should be fixed by https://sourceforge.net/p/uriparser/git/ci/048fc15e1667b8d34fad5211f97e19d375b91fc0/ on Git master now. I'm happy to use your full realname in the change log for credit instead if you share it with me trough some channel.
Best, Sebastian