Skip to content
Snippets Groups Projects
Commit 2cb39d9a authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Insure ctrl chars/codes are stripped from nodestatus() output

Use strlcpy instead of strncpy
parent 5e2d0074
No related branches found
No related tags found
No related merge requests found
......@@ -1644,7 +1644,8 @@ char* nodestatus(scfg_t* cfg, node_t* node, char* buf, size_t buflen, int num)
sprintf(str+strlen(str)
," %d error%c",node->errors, node->errors>1 ? 's' : '\0' );
strncpy(buf,str,buflen);
strip_ctrl(str, str);
strlcpy(buf,str,buflen);
return(buf);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment