[webkit-reviews] review granted: [Bug 210304] Do more checking before reusing precompiled sandbox : [Attachment 396453] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Apr 14 13:37:43 PDT 2020
Darin Adler <darin at apple.com> has granted Brent Fulgham <bfulgham at webkit.org>'s
request for review:
Bug 210304: Do more checking before reusing precompiled sandbox
https://bugs.webkit.org/show_bug.cgi?id=210304
Attachment 396453: Patch
https://bugs.webkit.org/attachment.cgi?id=396453&action=review
--- Comment #17 from Darin Adler <darin at apple.com> ---
Comment on attachment 396453
--> https://bugs.webkit.org/attachment.cgi?id=396453
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=396453&action=review
> Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm:426
> + RELEASE_ASSERT(!cachedHeader.sandboxBuildID[guidSize - 1]);
OK to have this, but overkill since we are using strlcpy, which guarantees null
termination. That’s it’s whole reason for existing.
> Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm:428
> + RELEASE_ASSERT(!cachedHeader.osVersion[versionSize - 1]);
Ditto.
> Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm:477
> + if (std::strcmp(cachedSandboxHeader.osVersion, osVersion.utf8().data()))
Given that this is an ASCII string, this can just be written:
if (cachedSandboxHeader.osVersion != systemMarketingVersion())
The String class already has a != operator that works.
More information about the webkit-reviews
mailing list