Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Hammacher <bmasterc@gmail.com>2021-09-05 21:44:15 +0300
committerChristian Hammacher <bmasterc@gmail.com>2021-09-05 21:44:15 +0300
commit16eac889476862aa272bccab2aadf0444d1ff467 (patch)
tree8480312513f10ceae43605f7a256896d95794448 /src/Platform
parent11423af6eb4866b0596ac751f4402324299a7cc5 (diff)
Fixed bug causing invalid string parameters
Diffstat (limited to 'src/Platform')
-rw-r--r--src/Platform/Heap.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Platform/Heap.cpp b/src/Platform/Heap.cpp
index 5f34a6f6..aa61ff45 100644
--- a/src/Platform/Heap.cpp
+++ b/src/Platform/Heap.cpp
@@ -391,7 +391,7 @@ void StringHandle::InternalAssign(const char *s, size_t len) noexcept
{
IndexSlot * const slot = AllocateHandle();
StorageSpace * const space = AllocateSpace(len + 1);
- SafeStrncpy(space->data, s, space->length);
+ SafeStrncpy(space->data, s, len + 1);
slot->storage = space;
slot->refCount = 1;
slotPtr = slot;