Browse Source

MT#55283 silence asan warning

Change-Id: I131e51fc826a52fb571e78f09aea3aa99e9e7e1f
rfuchs/1989
Richard Fuchs 4 months ago
parent
commit
98c088fced
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      lib/bencode.h

+ 3
- 0
lib/bencode.h View File

@ -380,6 +380,9 @@ INLINE str bencode_strdup_str(bencode_buffer_t *buf, const char *s) {
INLINE str bencode_str_strdup(bencode_buffer_t *buf, const str *s) {
str o = *s;
o.s = bencode_buffer_alloc(buf, o.len);
#ifdef ASAN_BUILD
if (o.len)
#endif
memcpy(o.s, s->s, o.len);
return o;
}


Loading…
Cancel
Save