merge fix

This commit is contained in:
2021-11-17 10:13:44 +01:00
13 changed files with 21 additions and 23 deletions

View File

@ -477,8 +477,9 @@ int setupDetectorServer(char *mess, char *sname) {
LOG(logINFO, ("\tinittab: DetectoServer line deleted\n"));
// add new link name to /etc/inittab
char *format = "echo 'ttyS0::respawn:/./%s' >> /etc/inittab";
if (snprintf(cmd, MAX_STR_LENGTH, format, linkname) >= MAX_STR_LENGTH) {
if (snprintf(cmd, MAX_STR_LENGTH,
"echo 'ttyS0::respawn:/./%s' >> /etc/inittab",
linkname) >= MAX_STR_LENGTH) {
strcpy(mess, "Could not copy detector server. Command "
"to add new server for spawning is too long\n");
LOG(logERROR, (mess));
@ -584,8 +585,8 @@ int moveBinaryFile(char *mess, char *dest, char *src, char *errorPrefix) {
// one can move into the current process binary (will not interfere in
// kernel mode)
char *format = "mv %s %s";
if (snprintf(cmd, MAX_STR_LENGTH, format, src, dest) >= MAX_STR_LENGTH) {
if (snprintf(cmd, MAX_STR_LENGTH, "mv %s %s", src, dest) >=
MAX_STR_LENGTH) {
sprintf(mess, "Could not %s. Command to move binary is too long\n",
errorPrefix);
LOG(logERROR, (mess));