- fixed some potential bugs introduced when replacing strncpy and

strncat by strlcpy and strlcat
This commit is contained in:
zolliker
2010-04-14 08:46:17 +00:00
parent 1c558e7f6c
commit 9690db1c3d
10 changed files with 20 additions and 20 deletions

4
Dbg.c
View File

@ -410,7 +410,7 @@ char *argv[];
if (compress) {
/* this copies from our static buf to printify's static buf */
/* and back to our static buf */
strlcpy(buf, printify(buf), buf_width);
strncpy(buf, printify(buf), buf_width);
}
/* usually but not always right, but assume truncation if buffer is */
@ -684,7 +684,7 @@ char **argv;
if (argc == 1)
argv[1] = "1";
strlcpy(viewFrameName, argv[1], FRAMENAMELEN);
strncpy(viewFrameName, argv[1], FRAMENAMELEN);
return TCL_RETURN;
}