From: Eric Sunshine Date: Tue, 31 Jul 2018 07:33:31 +0000 (-0400) Subject: sequencer: don't die() on bogus user-edited timestamp X-Git-Tag: v2.19.0-rc0~55^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/5522bbac2059283f7a91fa367fb1eb75faec2f3d?hp=5522bbac2059283f7a91fa367fb1eb75faec2f3d sequencer: don't die() on bogus user-edited timestamp read_author_ident() is careful to handle errors "gently" when parsing "rebase-merge/author-script" by printing a suitable warning and returning NULL; it never die()'s. One possible reason that parsing might fail is that "rebase-merge/author-script" has been hand-edited in such a way which corrupts it or the information it contains. However, read_author_ident() invokes fmt_ident() which is not so careful about failing "gently". It will die() if it encounters a malformed timestamp. Since read_author_ident() doesn't want to die() and since it's dealing with possibly hand-edited data, take care to avoid passing a bogus timestamp to fmt_ident(). A more "correctly engineered" fix would be to add a "gentle" version of fmt_ident(), however, such a change it outside the scope of the bug-fix series. If fmt_ident() ever does grow a "gentle" cousin, then the manual timestamp check added here can be retired. Signed-off-by: Eric Sunshine Signed-off-by: Junio C Hamano ---