[Webkit-unassigned] [Bug 55455] [EFL] HTML saving feature

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 12 06:21:11 PDT 2011


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


Leandro Pereira <leandro at profusion.mobi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #93264|review?, commit-queue?      |review-, commit-queue-
               Flag|                            |




--- Comment #14 from Leandro Pereira <leandro at profusion.mobi>  2011-05-12 06:21:11 PST ---
(From update of attachment 93264)
Just a quick, informal review.

View in context: https://bugs.webkit.org/attachment.cgi?id=93264&action=review

> Source/WebKit/efl/ewk/ewk_frame.cpp:2026
> +Eina_Bool ewk_frame_source_get(Evas_Object* o, char** frame_source)
> +{
> +    *frame_source = 0; // Saves 0 to pointer until it's not allocated.

Usually these things comes after smart_data getters and safety checks. Also, if frame_source is NULL, this will crash.

> Source/WebKit/efl/ewk/ewk_frame.cpp:2075
> +Eina_Bool ewk_frame_resources_location_get(Evas_Object* o, char*** resources_location_list, unsigned* list_count)
> +{
> +    // Saves safty values to the output parameters.
> +    *resources_location_list = 0;
> +    if (list_count)
> +        *list_count = 0;

Same comments as above.

> Source/WebKit/efl/ewk/ewk_frame.cpp:2101
> +    for (unsigned index = 0; index < resources_count; ++index) {
> +        tmp_list[index] = static_cast<char*> (malloc(sizeof(char) * resources_location[index].length() + 1));
> +        EINA_SAFETY_ON_NULL_RETURN_VAL(tmp_list[index], EINA_FALSE);

Possible memory leak.

-- 
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