Index: uspace/lib/cpp/include/impl/string.hpp
===================================================================
--- uspace/lib/cpp/include/impl/string.hpp	(revision 9315761b1d19fc3fd4d317908974f1cd0d8ed4b4)
+++ uspace/lib/cpp/include/impl/string.hpp	(revision b1b500b8bce6f1c90be020d1db31b7aeedc953d7)
@@ -642,5 +642,4 @@
                 {
                     auto len = min(n, str.size() - pos);
-                    ensure_free_space_(len);
 
                     return append(str.data() + pos, len);
@@ -653,6 +652,6 @@
                 // TODO: if (size_ + n > max_size()) throw length_error
                 ensure_free_space_(n);
-                traits_type::copy(data_ + size_, str, n);
-                size_ += n;
+                traits_type::copy(data_ + size_ - 1, str, n);
+                size_ += n - 1; // We are not copying str's null terminator.
                 ensure_null_terminator_();
 
