diff --git a/utils/utils.c b/utils/utils.c
index 009d082ef50afd58c6ddc54f27e9898bfaf26235..dd70f197b4fe086b2ed2e287a3c482c5dcb27b94 100644
--- a/utils/utils.c
+++ b/utils/utils.c
@@ -169,7 +169,7 @@ find_symbol (int idx, const ElfW(Sym) *stab, size_t symsz, const char *str, size
 // way about truncation though, should probably fix that:
 char *safe_strncpy (char *dest, const char *src, size_t n)
 {
-    char *rv = strncpy( dest, src, n );
+    char *rv = strncpy( dest, src, n - 1 );
     dest[ n - 1 ] = '\0';
     return rv;
 }