lease_file_remove(): replace strncpy/strncat by snprintf()
This commit is contained in:
parent
f6ac854f0f
commit
d0e7958617
|
@ -144,8 +144,7 @@ lease_file_remove(unsigned short eport, int proto)
|
|||
return -1;
|
||||
}
|
||||
|
||||
strncpy( tmpfilename, lease_file, sizeof(tmpfilename) );
|
||||
strncat( tmpfilename, "XXXXXX", sizeof(tmpfilename) - strlen(tmpfilename));
|
||||
snprintf( tmpfilename, sizeof(tmpfilename), "%sXXXXXX", lease_file);
|
||||
|
||||
fd = fopen( lease_file, "r");
|
||||
if (fd==NULL) {
|
||||
|
|
Loading…
Reference in New Issue