"From: " field in exported patch file is broken due to use-after-free
@genodeftest
Submitted by Christian Stadelmann Link to original bug (#777932)
Description
Created attachment 344528 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:
- open gitg on a repository (in my case gitg breaks on any repository)
- select a commit (in my case gitg breaks on any commit)
- right-click and click "Create patch"
- select a filename to store the file at
- 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.
Attachment 344528, "Backtraces from valgrind and gdb, including a full backtrace (t a a bt full)":
gitg-breaks-patch-from-field.gdb.txt
Version: 3.22.x
Resolution: RESOLVED FIXED