We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e4054f commit b5b008fCopy full SHA for b5b008f
stdlib/public/runtime/Metadata.cpp
@@ -27,6 +27,7 @@
27
#include "swift/Runtime/HeapObject.h"
28
#include "swift/Runtime/Mutex.h"
29
#include "swift/Runtime/Once.h"
30
+#include "swift/Runtime/Portability.h"
31
#include "swift/Strings.h"
32
#include "llvm/ADT/StringExtras.h"
33
#include <algorithm>
@@ -1861,7 +1862,7 @@ swift::swift_getTupleTypeMetadata(MetadataRequest request,
1861
1862
size_t labelsAllocSize = roundUpToAlignment(labelsLen + 1, sizeof(void*));
1863
char *newLabels =
1864
(char *) MetadataAllocator(TupleCacheTag).Allocate(labelsAllocSize, alignof(char));
- strcpy(newLabels, labels);
1865
+ _swift_strlcpy(newLabels, labels, labelsAllocSize);
1866
key.Labels = newLabels;
1867
1868
// Update the metadata cache.
0 commit comments