Spotted by Luiz, another invalid memory access when trying to read past the end of a string that's not nul-terminated. strndup to the rescue. Cheers