warnings: fix strncpy warnings
GCC is getting smarter and detects that we're not copying the NUL terminator over.
There are two approaches to fixing the warning:
- where code is already a bit more complicated, just use
std::stringinstead of C-style string manipulations; and
- where we were doing
strncpy(dest, src, strlen(src)), just use
strcpyinstead since the destination sizes are made based on the size of
This fixes warnings which have appeared on
megas due to its Fedora 28 update.