- fixed some potential bugs introduced when replacing strncpy and
strncat by strlcpy and strlcat
This commit is contained in:
4
Dbg.c
4
Dbg.c
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user