Skip to content

Commit

Permalink
Merge pull request #1 from bilaliscarioth/strlcpy
Browse files Browse the repository at this point in the history
Replace strpcy by strlcpy on String::concat which doesn't care of the length.
  • Loading branch information
bilaliscarioth authored Jan 16, 2025
2 parents c8c514c + 956896c commit 675ef46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cores/arduino/WString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ unsigned char String::concat(const char *cstr, unsigned int length)
if (!cstr) return 0;
if (length == 0) return 1;
if (!reserve(newlen)) return 0;
strcpy(buffer + len, cstr);
strlcpy(buffer + len, cstr, length);
len = newlen;
return 1;
}
Expand Down

0 comments on commit 675ef46

Please sign in to comment.