diff --git a/src/kits/tracker/FSUtils.cpp b/src/kits/tracker/FSUtils.cpp index 0929d9ea3b..ff1b5786dd 100644 --- a/src/kits/tracker/FSUtils.cpp +++ b/src/kits/tracker/FSUtils.cpp @@ -2996,7 +2996,7 @@ FSCreateNewFolderIn(const node_ref *dirNode, entry_ref *newRef, status_t result = dir.InitCheck(); if (result == B_OK) { char name[B_FILE_NAME_LENGTH]; - strcpy(name, B_TRANSLATE("New folder")); + strlcpy(name, B_TRANSLATE("New folder"), sizeof(name)); int32 fnum = 1; while (dir.Contains(name)) { diff --git a/src/kits/tracker/FindPanel.cpp b/src/kits/tracker/FindPanel.cpp index 7a6481da34..415ed48dd0 100644 --- a/src/kits/tracker/FindPanel.cpp +++ b/src/kits/tracker/FindPanel.cpp @@ -1319,9 +1319,9 @@ FindPanel::PushMimeType(BQuery *query) const if (strcmp(kAllMimeTypes, type)) { // add an asterisk if we are searching for a supertype char buffer[B_FILE_NAME_LENGTH]; - if (strchr(type,'/') == NULL) { - strcpy(buffer,type); - strcat(buffer,"/*"); + if (strchr(type, '/') == NULL) { + strlcpy(buffer, type, sizeof(buffer)); + strlcat(buffer, "/*", sizeof(buffer)); type = buffer; }