[webkit-reviews] review granted: [Bug 220668] Syscall param sendmsg(msg.msg_iov[1]) points to uninitialised byte(s) in IPC::Connection::sendOutgoingMessage : [Attachment 417777] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jan 19 09:24:32 PST 2021
Darin Adler <darin at apple.com> has granted Michael Catanzaro
<mcatanzaro at gnome.org>'s request for review:
Bug 220668: Syscall param sendmsg(msg.msg_iov[1]) points to uninitialised
byte(s) in IPC::Connection::sendOutgoingMessage
https://bugs.webkit.org/show_bug.cgi?id=220668
Attachment 417777: Patch
https://bugs.webkit.org/attachment.cgi?id=417777&action=review
--- Comment #22 from Darin Adler <darin at apple.com> ---
Comment on attachment 417777
--> https://bugs.webkit.org/attachment.cgi?id=417777
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=417777&action=review
> Source/WebKit/Platform/IPC/unix/ConnectionUnix.cpp:80
> + AttachmentInfo(const AttachmentInfo& info)
> + {
> + memset(static_cast<void*>(this), 0, sizeof(*this));
> + m_type = info.m_type;
> + m_isNull = info.m_isNull;
> + m_size = info.m_size;
> + }
This looks good to me.
> Source/WebKit/Platform/IPC/unix/ConnectionUnix.cpp:82
> + AttachmentInfo(AttachmentInfo&& info)
On reflection, I think we can omit this function entirely. As long as we don’t
implement a move constructor it will use the copy constructor, which for this
class is fine. There’s no requirement when moving that the original object is
zeroed, just needs to be safe to destroy.
> Source/WebKit/Platform/IPC/unix/UnixMessage.h:59
> + MessageInfo(MessageInfo&& info)
Same thought here. Don’t need this.
> Source/WebKit/Platform/IPC/unix/UnixMessage.h:69
> + MessageInfo& operator=(const MessageInfo&) = default;
> + MessageInfo& operator=(MessageInfo&&) = default;
Don’t need these.
More information about the webkit-reviews
mailing list