mirror of
https://github.com/git/git.git
synced 2024-11-23 18:05:29 +08:00
fmt_with_err: add a comment that truncation is OK
Functions like die_errno() use fmt_with_err() to combine the caller-provided format with the strerror() string. We use a fixed stack buffer because we're already handling an error and don't have any way to report another one. Our buffer should generally be big enough to fit this, but if it's not, truncation is our best option. Let's add a comment to that effect, so that anybody auditing the code for truncation bugs knows that this is fine. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
bf4baf1fed
commit
ac4896f007
Loading…
Reference in New Issue
Block a user