| commit | 76b3e046e79b8919bf3d3384b2375010d089127a | [log] [tgz] |
|---|---|---|
| author | Rui Ueyama <ruiu@google.com> | Thu Sep 28 00:27:39 2017 +0000 |
| committer | Rui Ueyama <ruiu@google.com> | Thu Sep 28 00:27:39 2017 +0000 |
| tree | 9512d70240a2a94cfbe12cf75f9fc9ff62f69971 | |
| parent | 5c883452a8e91e1f9e34fd7928f5a3151ce76047 [diff] |
Fix a UBsan bot. If we do not initialize Prefix here, Prefix.data() returns a nullptr. Later, it is passed to memcpy. memcpy's behavior is undefined if src (or dst) is a nullptr even if a given size is 0. That's why this code triggered UBsan. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314368 91177308-0d34-0410-b5e6-96231b3b80d8