@codebrainz mentioned the plugin's code is crap so perhaps it can be fixed inside it.

I didn't mean to imply the code is crap per se, just that it doesn't handle any error conditions on saving, likely due to its authors having never experienced such a scenario. But yeah, I'm quite sure it could be handled by improving the robustness of plugin's code, without modifying the API.

Somewhat related, while poking around in its code, I did notice a potential security issue/race condition where the code circumvents a feature of g_file_open_tmp() that returns an open file descriptor, giving it the same problems as the old tmpnam() function. This should be easily fixable by just moving the close() function to the bottom of the block, after the document_save_file() call, assuming it inter-operates alright with Geany's various file saving strategies.


Reply to this email directly or view it on GitHub.