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:
Jonas Sundström 2011-02-23 01:19:30 +00:00
parent 8d779aa8df
commit 585db48d51

View File

@ -241,7 +241,7 @@ BPrintJob::BeginJob()
// TODO: fSpoolFileName should store the name only (not path which can be
// 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);
if (fSpoolFile->InitCheck() != B_OK) {