aboutsummaryrefslogtreecommitdiff
path: root/xcursor
diff options
context:
space:
mode:
Diffstat (limited to 'xcursor')
-rw-r--r--xcursor/xcursor.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/xcursor/xcursor.c b/xcursor/xcursor.c
index acb2e1a8..d33dee28 100644
--- a/xcursor/xcursor.c
+++ b/xcursor/xcursor.c
@@ -655,7 +655,11 @@ _XcursorAddPathElt (char *path, const char *elt, int len)
elt++;
len--;
}
- strncat (path + pathlen, elt, len);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstringop-truncation"
+ strncpy (path + pathlen, elt, len);
+ path[pathlen + len] = '\0';
+#pragma GCC diagnostic pop
}
static char *