Use strlcpy not strncopy.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40036 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ryan Leavengood 2010-12-29 20:04:58 +00:00
parent 9c34e0e302
commit 4517bee6c0

View File

@ -1317,7 +1317,7 @@ StyledEditWindow::_LoadFile(entry_ref* ref)
BEntry entry(ref, true);
char name[B_FILE_NAME_LENGTH];
if (entry.GetName(name) != B_OK)
strncpy(name, B_TRANSLATE("???"), sizeof(name));
strlcpy(name, B_TRANSLATE("???"), sizeof(name));
BString text;
if (status == B_BAD_TYPE)