mirror of
https://github.com/matrix-construct/construct
synced 2024-06-02 10:08:56 +02:00
modules/net_dns: Ensure placement new pos is a copy of the pointer before inc.
This commit is contained in:
parent
844bf46a5c
commit
592181a09f
|
@ -355,7 +355,7 @@ ircd::net::dns::new_record(mutable_buffer &buf,
|
|||
if(unlikely(sizeof(type) > size(buf)))
|
||||
return nullptr;
|
||||
|
||||
const auto pos(data(buf));
|
||||
void *const pos(data(buf));
|
||||
consume(buf, sizeof(type));
|
||||
return new (pos) type(answer);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue