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

gEDA-cvs: branch: master updated (1.1.2.20070818-103-g1abfd25)



The branch, master has been updated
       via  1abfd25bf917ee4e90ccdbbbe9921db6ff46c49f (commit)
       via  b375e473f87f8883834f13638db873aefcdd1577 (commit)
      from  6831e3cbfbd23964ceb42f294075053899a9bcad (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 gschem/src/x_image.c  |    6 +++++-
 libgeda/src/a_basic.c |    2 +-
 libgeda/src/f_basic.c |    2 +-
 3 files changed, 7 insertions(+), 3 deletions(-)


=================
 Commit Messages
=================

commit 1abfd25bf917ee4e90ccdbbbe9921db6ff46c49f
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date:   Sat Nov 24 08:34:13 2007 +0000

    gschem: Fix NULL pointer risk in x_image.c [1802087]
    
    x_image_update_dialog_filename may attempt to deference a NULL
    pointer.

:100644 100644 af3db6a... 260911c... M	gschem/src/x_image.c
:100644 100644 f46b461... f802ed2... M	libgeda/src/a_basic.c
:100644 100644 331fd4a... bbd1096... M	libgeda/src/f_basic.c

=========
 Changes
=========

commit 1abfd25bf917ee4e90ccdbbbe9921db6ff46c49f
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date:   Sat Nov 24 08:34:13 2007 +0000

    gschem: Fix NULL pointer risk in x_image.c [1802087]
    
    x_image_update_dialog_filename may attempt to deference a NULL
    pointer.

diff --git a/gschem/src/x_image.c b/gschem/src/x_image.c
index af3db6a..260911c 100644
--- a/gschem/src/x_image.c
+++ b/gschem/src/x_image.c
@@ -222,7 +222,11 @@ static void x_image_update_dialog_filename(GtkComboBox *combo,
   /* If GTK < 2.6, get the description from the descriptions list */
   ptr = g_slist_nth(image_type_descriptions,
       gtk_combo_box_get_active(GTK_COMBO_BOX(combo)));
-  image_type_descr = (char *) (ptr->data);
+  if (ptr != NULL) {
+    image_type_descr = (char *) (ptr->data);
+  } else {
+    image_type_descr = NULL:
+  }
 #else
   image_type_descr = gtk_combo_box_get_active_text(GTK_COMBO_BOX(combo));
 #endif
diff --git a/libgeda/src/a_basic.c b/libgeda/src/a_basic.c
index f46b461..f802ed2 100644
--- a/libgeda/src/a_basic.c
+++ b/libgeda/src/a_basic.c
@@ -524,7 +524,7 @@ OBJECT *o_read(TOPLEVEL *toplevel, OBJECT *object_list, char *filename)
     {
       /* Report error to user, and free error */
       g_assert (buffer == NULL);
-      fprintf (stderr, "o_read: Unable to read file: [%s]\n", err->message);
+      fprintf (stderr, "o_read: %s\n", err->message);
       g_error_free (err);
       return NULL;
     } 
diff --git a/libgeda/src/f_basic.c b/libgeda/src/f_basic.c
index 331fd4a..bbd1096 100644
--- a/libgeda/src/f_basic.c
+++ b/libgeda/src/f_basic.c
@@ -199,7 +199,7 @@ int f_open_flags(TOPLEVEL *toplevel, const gchar *filename,
     toplevel->page_current->object_tail = (OBJECT *)
     o_read(toplevel, toplevel->page_current->object_tail,
 	   backup_filename);
-  } else if (g_file_test (full_filename, G_FILE_TEST_EXISTS)) {
+  } else {
     /* Load the original file */
     toplevel->page_current->object_tail = (OBJECT *)
     o_read(toplevel, toplevel->page_current->object_tail,




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs