Index: trunk/psLib/src/sys/psString.c
===================================================================
--- trunk/psLib/src/sys/psString.c	(revision 41171)
+++ trunk/psLib/src/sys/psString.c	(revision 42378)
@@ -41,4 +41,20 @@
 
 
+// gcc (Ubuntu 20.04) complains when strncpy is used to copy a fraction of a buffer,
+// potentially skipping the ending NULL.  To avoid the error, manually copy
+// and (to ensure the buffer ends in a NULL) set the last + 1 byte to NUL: 
+// WARNING : len(dest) must be >= n + 1
+char *ps_strncpy_nowarn (char *dest, const char *src, size_t n) {
+
+  size_t i;
+  
+  char *d = dest;
+  char *s = (char *) src;
+  for (i = 0; i < n && *s != 0; i++, d++, s++) { *d = *s; }
+  for ( ; i <= n; i++, d++) { *d = 0; }
+  
+  return dest;
+}
+
 psString p_psStringAlloc(const char *file,
                          unsigned int lineno,
