Skip to content

Commit 675ef46

Browse files
Merge pull request #1 from bilaliscarioth/strlcpy
Replace strpcy by strlcpy on String::concat which doesn't care of the length.
2 parents c8c514c + 956896c commit 675ef46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/arduino/WString.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ unsigned char String::concat(const char *cstr, unsigned int length)
266266
if (!cstr) return 0;
267267
if (length == 0) return 1;
268268
if (!reserve(newlen)) return 0;
269-
strcpy(buffer + len, cstr);
269+
strlcpy(buffer + len, cstr, length);
270270
len = newlen;
271271
return 1;
272272
}

0 commit comments

Comments
 (0)