Title: [181568] trunk/Source/WebCore
Revision
181568
Author
bfulg...@apple.com
Date
2015-03-16 11:23:54 -0700 (Mon, 16 Mar 2015)

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (181567 => 181568)


--- trunk/Source/WebCore/ChangeLog	2015-03-16 18:11:59 UTC (rev 181567)
+++ trunk/Source/WebCore/ChangeLog	2015-03-16 18:23:54 UTC (rev 181568)
@@ -1,3 +1,13 @@
+2015-03-16  Brent Fulgham  <bfulg...@apple.com>
+
+        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.
+
 2015-03-16  Brady Eidson  <beid...@apple.com>
 
         URLs visited during private browsing show up in WebpageIcons.db

Modified: trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp (181567 => 181568)


--- trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp	2015-03-16 18:11:59 UTC (rev 181567)
+++ trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp	2015-03-16 18:23:54 UTC (rev 181568)
@@ -108,13 +108,13 @@
     if (!colorObject)
         return Color::transparent;
 
-    int r;
-    int g;
-    int b;
+    int r = 0;
+    int g = 0;
+    int b = 0;
     if (!colorObject->getInteger("r", r) || !colorObject->getInteger("g", g) || !colorObject->getInteger("b", b))
         return Color::transparent;
 
-    double a;
+    double a = 1.0;
     if (!colorObject->getDouble("a", a))
         return Color(r, g, b);
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to