Skip to content

Fix rerere segfault with specially crafted merge

Elijah Newren git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 1 replyIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2t4200: demonstrate rerere segfault on specially crafted merget/t4200-rerere.sh+29 -00 replies
2/2rerere: avoid buffer overrunrerere.c t/t4200-rerere.sh+2 -21 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCHv2 0/2] Fix rerere segfault with specially crafted merge

This series documents and fixes a rerere segfault (dating back to git-2.7.0) when a merge strategy makes the last entry in the index be at stage 1.

Changes since last version:
- In my last submission I only had the code fix and no testcase; I even commented in the commit message that the bug "cannot be triggered in the current codebase" and mentioned that I was fixing it just because an exotic external merge strategy could trigger the bug. I realized later that it is triggerable without any exotic external merge strategies; built-in ones can do it.

Elijah Newren (2):
t4200: demonstrate rerere segfault on specially crafted merge
rerere: avoid buffer overrun

 rerere.c          |  2 +-
 t/t4200-rerere.sh | 29 +++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+), 1 deletion(-)
Signature · 1 line
2.19.0.2.gdbd064c81f