Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/util/vercmp.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-07-05 14:16:17 -0500
committerDan McGee <dan@archlinux.org>2011-07-05 21:29:02 -0500
commitae7139adcfa65991c71616e8de7910ff722d4166 (patch)
tree2126517e48edf71ae49e51fa264cc8ea4b946f81 /src/util/vercmp.c
parentdfc532668d4a4182ce196a895fdd5b017b505c6f (diff)
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 <dan@archlinux.org>
Diffstat (limited to 'src/util/vercmp.c')
-rw-r--r--src/util/vercmp.c2
1 files changed, 1 insertions, 1 deletions
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 <stdlib.h>
#include <stdio.h> /* printf */
-#include <string.h> /* strncpy */
+#include <string.h>
#define BASENAME "vercmp"