If the template name was long enough, we would have exceeded the string size.
CID 9046 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40649 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
84627497fb
commit
0e952e21c3
|
@ -3167,7 +3167,7 @@ BPoseView::NewFileFromTemplate(const BMessage *message)
|
|||
return;
|
||||
|
||||
char fileName[B_FILE_NAME_LENGTH] = "New ";
|
||||
strcat(fileName, message->FindString("name"));
|
||||
strlcat(fileName, message->FindString("name"), sizeof(fileName));
|
||||
FSMakeOriginalName(fileName, &destDir, " copy");
|
||||
|
||||
entry_ref srcRef;
|
||||
|
|
Loading…
Reference in New Issue