From 52236aad8177d4ae1df7b0c31633661775b759bb Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 25 May 2012 16:38:49 +0200 Subject: [PATCH 1/1] maint.mk: add strncpy-prohibiting syntax-check rule * top/maint.mk (sc_prohibit_strncpy): New rule, from coreutils. --- ChangeLog | 5 +++++ top/maint.mk | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index 686228ca0..125210066 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-05-25 Jim Meyering + + maint.mk: add strncpy-prohibiting syntax-check rule + * top/maint.mk (sc_prohibit_strncpy): New rule, from coreutils. + 2012-05-24 Jim Meyering maint.mk: compute $(gpg_key_ID) more portably diff --git a/top/maint.mk b/top/maint.mk index 974641077..11cb6a626 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -332,6 +332,14 @@ sc_prohibit_strcmp: halt='$(ME): replace strcmp calls above with STREQ/STRNEQ' \ $(_sc_search_regexp) +# Really. You don't want to use this function. +# It may fail to NUL-terminate the destination, +# and always NUL-pads out to the specified length. +sc_prohibit_strncpy: + @prohibit='\