]> git.ipfire.org Git - thirdparty/git.git/commit
history: initialize rev_info in cmd_history_reword()
authorRené Scharfe <l.s.r@web.de>
Sun, 8 Mar 2026 09:57:02 +0000 (10:57 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Mar 2026 19:34:52 +0000 (12:34 -0700)
commitd1f33c753de68f63c945c3213f439081ed11c27b
treeb1d20ab2a7a56a5a74169b841f38d1acd0d81011
parent1278a26544e81dddf564fd7730890a7e023ed367
history: initialize rev_info in cmd_history_reword()

git history reword expects a single valid revision argument and errors
out if it doesn't get it.  In that case the struct rev_info passed to
release_revisions() for cleanup is still uninitialized, which can result
in attempts to free(3) random pointers.  Avoid that by initializing the
structure.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/history.c