On Wed, Jan 08, 2025 at 08:17:23PM +0100, Johannes Schindelin wrote: > On Fri, 6 Dec 2024, Patrick Steinhardt wrote: > > @@ -501,7 +505,7 @@ static void emit_other(struct blame_scoreboard *sb, struct blame_entry *ent, int > > length--; > > putchar('?'); > > } > > - printf("%.*s", length, hex); > > + fwrite(hex, 1, length, stdout); > > I just noticed this, and would like to point out a difference of behavior. > Try this at home: > > git blame --abbrev=99999 git.c > > The difference relative to the previous behavior that I am observing is > that the `fwrite()` call does not stop at the NUL character and hence > happily continues out-of-bounds. The `printf()` call would have stopped at > the NUL character. Oof, of course, that's an embarassing one. I'll post a patch in a bit. Thanks! Patrick