[Github-comments] [geany] Geany hangs on saving a certain file (reproducible) (#815)

Matthew Brush notifications at xxxxx
Wed Dec 16 10:58:41 UTC 2015


> @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](https://github.com/geany/geany/blob/master/plugins/saveactions.c#L268) 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:
https://github.com/geany/geany/issues/815#issuecomment-165066842
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20151216/873941b0/attachment.html>


More information about the Github-comments mailing list