2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 13:02:11 +00:00

Fix errors reported by ubsan. (memcpy w/ nullptr).

This commit is contained in:
Steven Watanabe
2019-04-24 16:31:31 -06:00
parent cac0ea348a
commit 2d306dbe9c
2 changed files with 14 additions and 9 deletions

View File

@@ -148,7 +148,8 @@ void string_append_range( string * self, char const * start, char const * finish
maybe_reserve( self, new_size );
memcpy( self->value + self->size, start, rhs_size );
if ( start != finish )
memcpy( self->value + self->size, start, rhs_size );
self->size = new_size;
self->value[ new_size ] = 0;