mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-05-28 15:34:31 +00:00
fix(kernel): fix empty initialization of std::string (str = "")
_size is 0 which fails the memcpy checks Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
parent
cfb5d9a0f4
commit
ca8dc6429b
@ -1013,7 +1013,7 @@ namespace std
|
||||
_size = Traits::length(s);
|
||||
_capacity = _size + 1;
|
||||
_data = _alloc.allocate(_capacity);
|
||||
memcpy(_data, s, _size);
|
||||
memcpy(_data, s, _size > 0 ? _size : 1);
|
||||
_data[_size] = '\0';
|
||||
return *this;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user