Commit e600592
builtin/blame: destroy initialized commit_info only
Since ea02ffa (mailmap: simplify map_user() interface, 2013-01-05),
find_alignment() has been invoking commit_info_destroy() on an
uninitialized auto 'struct commit_info' (when METAINFO_SHOWN is not
set). commit_info_destroy() calls strbuf_release() for each
'commit_info' strbuf member, which randomly invokes free() on
whatever random stack value happens to reside in strbuf.buf, thus
leading to periodic crashes.
Reported-by: Dilyan Palauzov <[email protected]>
Signed-off-by: Eric Sunshine <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 3d8a54e commit e600592
1 file changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1843 | 1843 | | |
1844 | 1844 | | |
1845 | 1845 | | |
1846 | | - | |
1847 | 1846 | | |
1848 | 1847 | | |
1849 | 1848 | | |
| |||
1854 | 1853 | | |
1855 | 1854 | | |
1856 | 1855 | | |
| 1856 | + | |
1857 | 1857 | | |
1858 | 1858 | | |
1859 | 1859 | | |
| |||
1862 | 1862 | | |
1863 | 1863 | | |
1864 | 1864 | | |
| 1865 | + | |
1865 | 1866 | | |
1866 | 1867 | | |
1867 | 1868 | | |
| |||
1871 | 1872 | | |
1872 | 1873 | | |
1873 | 1874 | | |
1874 | | - | |
1875 | | - | |
1876 | 1875 | | |
1877 | 1876 | | |
1878 | 1877 | | |
| |||
0 commit comments