[Webkit-unassigned] [Bug 148388] We should also store the time information for recent searches

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 12 18:59:22 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=148388

--- Comment #42 from Zach Li <zacharyli323 at gmail.com> ---
(In reply to comment #40)
> (In reply to comment #28)
> > Comment on attachment 262212 [details]
> > Patch v4
> > 
> > 
> > This function is dangerous. It returns a newly created Objective-C object,
> > but doesn’t use autorelease, nor wrap the pointer in a RetainPtr, nor does
> > it follow the create/copy rule for naming functions that create new objects
> > without autoreleasing them. I suggest using RetainPtr for the result here so
> > we don’t leak memory.
> > 
> > I’m also not sure that [NSMutableDictionary initWithContentsOfFile:] is safe
> > to use on an untrusted file. We need to instead use an appropriate API that
> > doesn’t allow objects of arbitrary classes.
> 
> I agree. This should use NSPropertyListSerialization, and pass
> NSPropertyListMutableContainersAndLeaves for its mutability options.

I think NSPropertyListMutableContainers will suffice, which is what [NSMutableDictionary initWithContentsOfFile:] will pass to NSPropertyListSerialization.  We do not need things like NSString in the plist to be guaranteed to be mutable; we just need the containers to be guaranteed mutable.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151013/ac8b0981/attachment-0001.html>


More information about the webkit-unassigned mailing list