diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2016-06-29 16:14:54 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-06-29 15:07:02 -0700 |
commit | 3324dd8f267cb59cdd42ac33727b6844921d5017 (patch) | |
tree | 40bddd3eb8bb41fdd0724d4a6d24037be083a99e /t/t3418-rebase-continue.sh | |
parent | Git 2.6.6 (diff) | |
download | tgif-3324dd8f267cb59cdd42ac33727b6844921d5017.tar.xz |
commit -S: avoid invalid pointer with empty message
While it is not recommended, fsck.c says:
Not having a body is not a crime [...]
... which means that we cannot assume that the commit buffer
contains an empty line to separate header from body. A commit
object with only a header without any body, not even without
a blank line after the header, is valid.
So let's tread carefully here. strstr("\n\n") may find nothing
and return NULL.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3418-rebase-continue.sh')
0 files changed, 0 insertions, 0 deletions