[gimp/pippin/goat-invasion] app: initialize all members of a GimpAnchor



commit 55bcf6a52d1916e6e72e4046f6a0d89152d4265d
Author: Massimo Valentini <mvalentini src gnome org>
Date:   Tue Mar 13 20:42:31 2012 +0100

    app: initialize all members of a GimpAnchor
    
    Conditional jump or move depends on uninitialised value(s)
    ==28817==    at 0x6AA386: gimp_coords_manhattan_dist (gimp/app/core/gimpcoords.c:175)
    ==28817==    by 0x6AB428: gimp_coords_bezier_is_straight (gimp/app/core/gimpcoords-interpolate.c:213)
    ==28817==    by 0x67663B: gimp_bezier_stroke_segment_nearest_point_get (gimp/app/vectors/gimpbezierstroke.c:676)
    ==28817==    by 0x676C86: gimp_bezier_stroke_nearest_point_get (gimp/app/vectors/gimpbezierstroke.c:631)
    ==28817==    by 0x4D79E3: gimp_draw_tool_on_vectors_curve (gimp/app/tools/gimpdrawtool.c:1175)
    ==28817==    by 0x4D7CD5: gimp_draw_tool_on_vectors (gimp/app/tools/gimpdrawtool.c:1242)
    ==28817==    by 0x511CE7: gimp_vector_tool_oper_update (gimp/app/tools/gimpvectortool.c:989)
    ==28817==    by 0x50B059: gimp_tool_oper_update (gimp/app/tools/gimptool.c:970)
    ==28817==    by 0x546F3C: gimp_display_shell_canvas_tool_events (gimp/app/display/gimpdisplayshell-tool-events.c:401)
    ==28817==    by 0x52A42E2: _gtk_marshal_BOOLEAN__BOXED (gtk-2-24/gtk/gtkmarshalers.c:86)
    
    Steps to reproduce:
    
    G_SLICE=always-malloc valgrind gimp-2.7 app/tests/*/*.xcf
    
    B (Activate Path tool)

 app/xcf/xcf-load.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/app/xcf/xcf-load.c b/app/xcf/xcf-load.c
index be9fb2d..23593c6 100644
--- a/app/xcf/xcf-load.c
+++ b/app/xcf/xcf-load.c
@@ -1893,7 +1893,7 @@ xcf_load_vector (XcfInfo   *info,
 
       GValueArray *control_points;
       GValue       value = { 0, };
-      GimpAnchor   anchor;
+      GimpAnchor   anchor = { { 0, } };
       GType        stroke_type;
 
       g_value_init (&value, GIMP_TYPE_ANCHOR);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]