Index: uspace/lib/cpp/include/__bits/string/string.hpp
===================================================================
--- uspace/lib/cpp/include/__bits/string/string.hpp	(revision f5fc6a82cdc29530ddfc80b84b8b293e40f3547c)
+++ uspace/lib/cpp/include/__bits/string/string.hpp	(revision 1339fd97803b0d04a8f07deacf2f07239962148c)
@@ -521,5 +521,5 @@
 
             basic_string(size_type n, value_type c, const allocator_type& alloc = allocator_type{})
-                : data_{}, size_{n}, capacity_{n}, allocator_{alloc}
+                : data_{}, size_{n}, capacity_{n + 1}, allocator_{alloc}
             {
                 data_ = allocator_.allocate(capacity_);
@@ -908,5 +908,5 @@
             {
                 // TODO: if (n > max_size()) throw length_error.
-                resize_without_copy_(n);
+                resize_without_copy_(n + 1);
                 traits_type::copy(begin(), str, n);
                 size_ = n;
