⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 181568 in webkit


Ignore:
Timestamp:
Mar 16, 2015, 11:23:54 AM (11 years ago)
Author:
Brent Fulgham
Message:

Potentially uninitialized Inspector values
https://bugs.webkit.org/show_bug.cgi?id=142730

Reviewed by Joseph Pecoraro.

  • inspector/InspectorDOMAgent.cpp:

(WebCore::parseColor): Make sure color values are given an initial value.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r181565 r181568  
     12015-03-16  Brent Fulgham  <bfulgham@apple.com>
     2
     3        Potentially uninitialized Inspector values
     4        https://bugs.webkit.org/show_bug.cgi?id=142730
     5
     6        Reviewed by Joseph Pecoraro.
     7
     8        * inspector/InspectorDOMAgent.cpp:
     9        (WebCore::parseColor): Make sure color values are given an initial value.
     10
    1112015-03-16  Brady Eidson  <beidson@apple.com>
    212
  • trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp

    r180116 r181568  
    109109        return Color::transparent;
    110110
    111     int r;
    112     int g;
    113     int b;
     111    int r = 0;
     112    int g = 0;
     113    int b = 0;
    114114    if (!colorObject->getInteger("r", r) || !colorObject->getInteger("g", g) || !colorObject->getInteger("b", b))
    115115        return Color::transparent;
    116116
    117     double a;
     117    double a = 1.0;
    118118    if (!colorObject->getDouble("a", a))
    119119        return Color(r, g, b);
Note: See TracChangeset for help on using the changeset viewer.