[Webkit-unassigned] [Bug 89719] [EFL] ProcessExecutablePath is required

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 22 03:16:19 PDT 2012


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





--- Comment #4 from Christophe Dumez <christophe.dumez at intel.com>  2012-06-22 03:16:18 PST ---
(From update of attachment 148924)
View in context: https://bugs.webkit.org/attachment.cgi?id=148924&action=review

> Source/WebKit2/Shared/efl/ProcessExecutablePathEfl.cpp:34
> +    char readLinkBuffer[PATH_MAX];

PATH_MAX is not guaranteed to be defined. It is better to use lstat() (see st_size member) to get the size and then use malloc to dynamically allocate the memory.

> Source/WebKit2/Shared/efl/ProcessExecutablePathEfl.cpp:36
> +    memset(readLinkBuffer, 0, PATH_MAX);

It would be less expensive to put a '\0' at the end after the readlink().

> Source/WebKit2/Shared/efl/ProcessExecutablePathEfl.cpp:42
> +        char* executablePathPtr = dirname(readLinkBuffer);

For clarity, I think it would be nice to use const char* here.

> Source/WebKit2/Shared/efl/ProcessExecutablePathEfl.cpp:43
> +        executablePath = String(executablePathPtr);

You should probably use String::fromUTF8().

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



More information about the webkit-unassigned mailing list