From ae7139adcfa65991c71616e8de7910ff722d4166 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 5 Jul 2011 14:16:17 -0500 Subject: Remove most usages of strncmp() The supposed safety blanket of this function is better handled by explicit length checking and usages of strlen() on known NULL-terminated strings rather than hoping things fit in a buffer. We also have no need to fully fill a PATH_MAX length variable with NULLs every time as long as a single terminating byte is there. Remove usages of it by using strcpy() or memcpy() as appropriate, after doing length checks via strlen(). Signed-off-by: Dan McGee --- src/util/vercmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/util') diff --git a/src/util/vercmp.c b/src/util/vercmp.c index 88cf49a6..f4356fb4 100644 --- a/src/util/vercmp.c +++ b/src/util/vercmp.c @@ -20,7 +20,7 @@ #include #include /* printf */ -#include /* strncpy */ +#include #define BASENAME "vercmp" -- cgit v1.2.3