From 734d0aee1578694f7c5afffdc1e49ae8849f8afd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Fri, 27 Apr 2018 12:06:42 +0200 Subject: [PATCH] * src/utils.c (match_tail): Fix unsigned integer overflow --- src/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.c b/src/utils.c index 6694132e..ec55f2e0 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1153,7 +1153,7 @@ accdir (const char *directory) bool match_tail (const char *string, const char *tail, bool fold_case) { - int pos = strlen (string) - strlen (tail); + int pos = (int) strlen (string) - (int) strlen (tail); if (pos < 0) return false; /* tail is longer than string. */