Christian Kellner bbde1d0357 Ensure strncpy'ed strings are all null terminated
If there is no null byte among the first n bytes of the source the
resulting string will not be properly null terminated.
Ensure that all strings that are copied via strncpy are properly
terminated copy "sizeof (dest) - 1" bytes and manually terminate
the string in the cases the array was not initialized.

Example compiler warning:
  ../daemon/gamemode-tests.c: In function ‘run_cpu_governor_tests’:
  ../daemon/gamemode-tests.c:326:4: warning: ‘strncpy’ specified bound
      256 equals destination size [-Wstringop-truncation]
    strncpy(defaultgov, currentgov, CONFIG_VALUE_MAX);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019-03-28 11:40:40 +00:00
..
2019-03-14 16:59:30 +00:00
2019-03-14 16:59:30 +00:00
2019-03-14 16:59:30 +00:00
2019-03-14 16:59:30 +00:00
2019-03-14 16:59:30 +00:00
2019-03-14 16:59:30 +00:00
2019-03-14 16:59:30 +00:00
2019-03-14 16:59:30 +00:00
2019-03-14 16:59:30 +00:00
2019-03-14 16:59:30 +00:00
2019-03-14 16:59:30 +00:00
2019-03-14 16:59:30 +00:00
2019-03-14 16:59:30 +00:00
2019-03-14 16:59:30 +00:00
2019-03-14 16:59:30 +00:00
2019-03-14 16:59:30 +00:00