dtimsstart: Coverity fixes

This commit is contained in:
Peter Howkins
2018-04-28 21:44:27 +01:00
parent 55c120b287
commit 62ee95bce2
7 changed files with 15 additions and 19 deletions

View File

@@ -260,7 +260,7 @@ bool parse_dpy_str(display_str, host, dnum, snum, dnet)
char buf[BUFSIZ], hostbuf[BUFSIZ], *p, *hp, *pdnum, *psnum;
int isdnet = 0;
strcpy(buf, display_str);
snprintf(buf, sizeof(buf), "%s", display_str);
/* extract host name */
if (!(p = strchr(buf, ':'))) return False;