After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 711070 - Copying a symlink over another one segfaults
Copying a symlink over another one segfaults
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
2.38.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2013-10-29 12:53 UTC by Ross Lagerwall
Modified: 2013-10-29 15:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gio: Clear error properly to prevent crash (902 bytes, patch)
2013-10-29 12:55 UTC, Ross Lagerwall
accepted-commit_now Details | Review

Description Ross Lagerwall 2013-10-29 12:53:26 UTC
Copying a symlink over another one (with the OVERWRITE flag) causes a segfault.
Comment 1 Ross Lagerwall 2013-10-29 12:55:20 UTC
Created attachment 258441 [details] [review]
gio: Clear error properly to prevent crash
Comment 2 Colin Walters 2013-10-29 14:23:44 UTC
Review of attachment 258441 [details] [review]:

Looks good!   Do you have a GNOME git account?

::: gio/gfile.c
@@ +2506,3 @@
           my_error->domain == G_IO_ERROR && my_error->code == G_IO_ERROR_EXISTS)
         {
+          g_clear_error (&my_error);

Oops, yes.
Comment 3 Ross Lagerwall 2013-10-29 14:51:39 UTC
(In reply to comment #2)
> Review of attachment 258441 [details] [review]:
> 
> Looks good!   Do you have a GNOME git account?
> 

Yes, I just got commit access to gvfs.  What's the policy for committing to other (possibly closely related) projects?
Comment 4 Colin Walters 2013-10-29 14:55:22 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Review of attachment 258441 [details] [review] [details]:
> > 
> > Looks good!   Do you have a GNOME git account?
> > 
> 
> Yes, I just got commit access to gvfs.  What's the policy for committing to
> other (possibly closely related) projects?

Depends on the project, but with glib we try to peer review almost everything.  But this patch is accepted-commit_now, so please push!
Comment 5 Ross Lagerwall 2013-10-29 15:10:34 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > Review of attachment 258441 [details] [review] [details] [details]:
> > > 
> > > Looks good!   Do you have a GNOME git account?
> > > 
> > 
> > Yes, I just got commit access to gvfs.  What's the policy for committing to
> > other (possibly closely related) projects?
> 
> Depends on the project, but with glib we try to peer review almost everything. 
> But this patch is accepted-commit_now, so please push!

Thanks.  Pushed to master as 1a037b1 and stable as 685ff5c.