[Pixman] [PATCH] Fixing the runtime error in VS debug build under Windows.

Gang Ji gangji at google.com
Mon Mar 28 10:52:41 PDT 2011


Hi everyone,

We have met a run time crash when using a debug VS build under Windows due
to potential of using an uninitialized variable.  By looking at the code,
max_vx could also be an uninitialized value.  The fix is to initial that
variable to 0.  The version we are using is 0.21.4.

Thanks,
Gang

---

Index: pixman/pixman-fast-path.h
===================================================================
--- pixman/pixman-fast-path.h   (revision 233)
+++ pixman/pixman-fast-path.h   (revision 234)
@@ -265,7 +265,7 @@
     dst_type_t *dst_line;
                   \
     src_type_t *src_first_line;
                           \
     int       y;
                    \
-    pixman_fixed_t max_vx = max_vx; /* suppress uninitialized variable
warning */              \
+    pixman_fixed_t max_vx = 0;
                    \
     pixman_fixed_t max_vy;
                    \
     pixman_vector_t v;
                    \
     pixman_fixed_t vx, vy;
                    \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pixman/attachments/20110328/00a9f427/attachment.htm>


More information about the Pixman mailing list