[Webkit-unassigned] [Bug 12111] New: Uninitialized variable in -[WebDefaultPolicyDelegate webView:decidePolicyForMIMEType:request:frame:decisionListener:]

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 4 06:45:56 PST 2007


http://bugs.webkit.org/show_bug.cgi?id=12111

           Summary: Uninitialized variable in -[WebDefaultPolicyDelegate
                    webView:decidePolicyForMIMEType:request:frame:decisionLi
                    stener:]
           Product: WebKit
           Version: 420+ (nightly)
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebKit Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: jim.correia at pobox.com


-[WebDefaultPolicyDelegate
webView:decidePolicyForMIMEType:request:frame:decisionListener:]

has the following code in its implementation:

    if ([[request URL] isFileURL]) {
        BOOL isDirectory;
        [[NSFileManager defaultManager] fileExistsAtPath:[[request URL] path]
isDirectory:&isDirectory];

        if (isDirectory) {
            [listener ignore];


isDirectory is only filled in by the NSFileManager method in the case that the
file exists. In all other cases we are using an uninitialized variable.
Initializing the variable is sufficient to solve the problem.

See also rdar://problem/4908081


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list