GNOME Bugzilla – Bug 777932
"From: " field in exported patch file is broken due to use-after-free
Last modified: 2019-02-22 03:51:31 UTC
Created attachment 344528 [details] Backtraces from valgrind and gdb, including a full backtrace (t a a bt full) In patches I exported from gitg lately, the "From: " field is broken. See https://bug776413.bugzilla-attachments.gnome.org/attachment.cgi?id=344486 for an example. Some examples: > From: <ð7šŸU> > From: 0 <> > From: <ÐEšŸU> > From: <P/ÏíU> I can reproduce this bug by following these steps: 1. open gitg on a repository (in my case gitg breaks on any repository) 2. select a commit (in my case gitg breaks on any commit) 3. right-click and click "Create patch" 4. select a filename to store the file at 5. confirm the dialog So I ran $ valgrind --vgdb=full --vgdb-error=0 /usr/bin/gitg and attached gdb to it and it reported a use-after-free at the exact moment when I save the patch file (step 5). It is attached, including a gdb backtrace.
Sorry, I forgot to add the version numbers: gitg-3.22.0-2.fc25.x86_64 libgit2-0.24.6-1.fc25.x86_64 libgit2-glib-0.24.4-2.fc25.x86_64 git-2.9.3-2.fc25.x86_64
*** Bug 781263 has been marked as a duplicate of this bug. ***
Created attachment 351255 [details] [review] Set correct native when setting email options author When setting the author for email options, the code makes a copy of the signature parameter, but takes the native of the original object, which can result in use-after-free when the original object is destroyed.
Review of attachment 351255 [details] [review]: good catch
Attachment 351255 [details] pushed as 0e1e1bc - Set correct native when setting email options author