Unsafe use of strncpy replaced by strlcpy. CID 2238.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40632 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -241,7 +241,7 @@ BPrintJob::BeginJob()
|
|||||||
|
|
||||||
// TODO: fSpoolFileName should store the name only (not path which can be
|
// TODO: fSpoolFileName should store the name only (not path which can be
|
||||||
// 1024 bytes long)
|
// 1024 bytes long)
|
||||||
strncpy(fSpoolFileName, path.Path(), sizeof(fSpoolFileName));
|
strlcpy(fSpoolFileName, path.Path(), sizeof(fSpoolFileName));
|
||||||
fSpoolFile = new BFile(fSpoolFileName, B_READ_WRITE | B_CREATE_FILE);
|
fSpoolFile = new BFile(fSpoolFileName, B_READ_WRITE | B_CREATE_FILE);
|
||||||
|
|
||||||
if (fSpoolFile->InitCheck() != B_OK) {
|
if (fSpoolFile->InitCheck() != B_OK) {
|
||||||
|
|||||||
Reference in New Issue
Block a user