Bug 156749 - Paths returned by fileSystemRepresentation are not consistently checked for Null strings
Summary: Paths returned by fileSystemRepresentation are not consistently checked for N...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-04-19 09:48 PDT by Brent Fulgham
Modified: 2016-04-19 14:22 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2016-04-19 09:48:00 PDT
Our FileSystem::fileSystemRepresentation method returns CString() under various error conditions. In most cases, we check for a null return of this method before passing the result on to functions (primarily POSIX routines) that are specified as crashing (or undefined behavior) if given a NULL input.

We need to be consistent about checking this return value.
Comment 1 Radar WebKit Bug Importer 2016-04-19 11:04:20 PDT
<rdar://problem/25807632>
Comment 2 Brent Fulgham 2016-04-19 11:58:38 PDT
I did a search for instances of 'fileSystemRepresentation', and found that all cases except for SandboxExtension::createHandle were safe.

The various POSIX functions called with the result of this function handle null inputs properly.
Comment 3 Brent Fulgham 2016-04-19 14:22:37 PDT
No changes needed here. A fix for SandboxExtension::createHandle will be landed soon.