fix some coverity warnings

This commit is contained in:
Miroslav Lichvar
2017-01-09 13:43:26 +01:00
parent 8f7ab95ff0
commit a7802e9a76
3 changed files with 8 additions and 4 deletions

3
main.c
View File

@@ -325,7 +325,8 @@ go_daemon(void)
if (r) {
if (r > 0) {
/* Print the error message from the child */
fprintf(stderr, "%.1024s\n", message);
message[sizeof (message) - 1] = '\0';
fprintf(stderr, "%s\n", message);
}
exit(1);
} else