0
0
Fork 0
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:
Jason Volk 2019-09-07 13:22:36 -07:00
parent 844bf46a5c
commit 592181a09f

View file

@ -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);
}