From ace5707a803eda0f1dde3d776dc3729d3bc7759a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 2 Jan 2019 09:38:46 +0000 Subject: banned.h: mark strncat() as banned strncat() has the same quadratic behavior as strcat() and is difficult-to-read and bug-prone. While it hasn't yet been a problem in git iself, strncat() found it's way into 'master' of cgit and caused segfaults on my system. Signed-off-by: Eric Wong Signed-off-by: Junio C Hamano --- banned.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'banned.h') diff --git a/banned.h b/banned.h index 28f5937035..447af24807 100644 --- a/banned.h +++ b/banned.h @@ -16,6 +16,8 @@ #define strcat(x,y) BANNED(strcat) #undef strncpy #define strncpy(x,y,n) BANNED(strncpy) +#undef strncat +#define strncat(x,y,n) BANNED(strncat) #undef sprintf #undef vsprintf -- cgit v1.2.3