On Tue, Feb 07, 2012 at 10:43:15PM +0100, Simon Wenner wrote: > 1. Create a data project > 2. Add a folder with some files in it > 3. Select a file inside this folder > 4. Press on the "new folder" button > 5. Enter a name and hit enter > 6. Segfault
I just tried to figure out the issue here. It seems, as long as BraseroFileNode * brasero_file_node_new_empty_folder (const gchar *name); sets node->is_fake = TRUE, it won't be so easy to bypass this. Background: A node that is to be renamed, removed, or used as parent (i.e. you try to move a file into the newly created dir), needs an URI. Those are received by brasero_data_project_node_to_uri() of which the return value isn't checked (in neither of the above mentioned cases IIRC). Given a node that has is_fake set, the function returns NULL, though. Trying to create a hash (by using g_str_hash() from glib2) will thus lead to a segfault (dereferencing NULL). Obviously, one could just check return values and circumvent the part that uses the URI. This makes renaming work (which is what the bug reporter experienced not to work) as well as removing. You can't move anything into a fake dir, though. At least I didn't figure out how that would be possible (or make sense anyways). And suddenly, a new directory isn't worth much. :) Maybe this helps someone who knows the code better than me to get into the problem more easily. Hauke -- .''`. Jan Hauke Rahm <j...@debian.org> www.jhr-online.de : :' : Debian Developer www.debian.org `. `'` Member of the Linux Foundation www.linux.com `- Fellow of the Free Software Foundation Europe www.fsfe.org
signature.asc
Description: Digital signature