We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent befc608 commit 82aa706Copy full SHA for 82aa706
1 file changed
src/error_handling_helpers.h
@@ -54,7 +54,7 @@ __rcutils_copy_string(char * dst, size_t dst_size, const char * src)
54
assert(dst_size > 0);
55
assert(src != NULL);
56
// doesn't matter how long src actually is if it is longer than dst, so limit to dst + 1
57
- size_t src_length = strnlen(src, dst_size);
+ size_t src_length = strlen(src);
58
size_t size_to_copy = src_length;
59
// the destination must be one byte bigger to store the NULL terminating character
60
if (src_length >= dst_size) {
0 commit comments