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 <e@80x24.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
0d0ac3826a
commit
ace5707a80
2
banned.h
2
banned.h
@ -16,6 +16,8 @@
|
|||||||
#define strcat(x,y) BANNED(strcat)
|
#define strcat(x,y) BANNED(strcat)
|
||||||
#undef strncpy
|
#undef strncpy
|
||||||
#define strncpy(x,y,n) BANNED(strncpy)
|
#define strncpy(x,y,n) BANNED(strncpy)
|
||||||
|
#undef strncat
|
||||||
|
#define strncat(x,y,n) BANNED(strncat)
|
||||||
|
|
||||||
#undef sprintf
|
#undef sprintf
|
||||||
#undef vsprintf
|
#undef vsprintf
|
||||||
|
Loading…
Reference in New Issue
Block a user