From: Jonas Fonseca Date: Sat, 2 Jun 2007 16:18:24 +0000 (+0200) Subject: Fix string_copy macro to use sizeof(src) for the source buffer X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=751e27c90eea47b4eacdd7b657731712712f7356;p=tig.git Fix string_copy macro to use sizeof(src) for the source buffer --- diff --git a/tig.c b/tig.c index e918fe6..ba1ad3d 100644 --- a/tig.c +++ b/tig.c @@ -169,7 +169,7 @@ string_ncopy_do(char *dst, size_t dstlen, const char *src, size_t srclen) /* Shorthands for safely copying into a fixed buffer. */ #define string_copy(dst, src) \ - string_ncopy_do(dst, sizeof(dst), src, sizeof(dst)) + string_ncopy_do(dst, sizeof(dst), src, sizeof(src)) #define string_ncopy(dst, src, srclen) \ string_ncopy_do(dst, sizeof(dst), src, srclen)