Git fork

compat/hstrerror: convert sprintf to snprintf

This is a trivially correct use of sprintf, as our error
number should not be excessively long. But it's still nice
to drop an sprintf call.

Note that we cannot use xsnprintf here, because this is
compat code which does not load git-compat-util.h.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Jeff King and committed by
Junio C Hamano
48bdf869 f5691aa6

+1 -1
+1 -1
compat/hstrerror.c
··· 16 16 case TRY_AGAIN: 17 17 return "Non-authoritative \"host not found\", or SERVERFAIL"; 18 18 } 19 - sprintf(buffer, "Name resolution error %d", err); 19 + snprintf(buffer, sizeof(buffer), "Name resolution error %d", err); 20 20 return buffer; 21 21 }