Skip to content

Commit

Permalink
Fix string_copy macro to use sizeof(src) for the source buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas committed Jun 2, 2007
1 parent cf63d30 commit 751e27c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tig.c
Expand Up @@ -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)
Expand Down

0 comments on commit 751e27c

Please sign in to comment.