Package: gnome-pim
Version: 1.4.6-1woody1
Severity: normal
Tags: patch

hi

for unknown reasons, my calendar file was corrupted (on just one record)

problem is, gnomecal would crash when opening it

I looked into the code, and noticed that gnomecal
does not check some pointers to be  != NULL

here attached is a simple patch

a.


-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.8-3-k7
Locale: LANG=it_IT, LC_CTYPE=it_IT (charmap=ISO-8859-1)

Versions of packages gnome-pim depends on:
ii  gdk-imlib1         1.9.14-16.2           imaging library for use with gtk (
ii  libart2            1.4.2-19              The GNOME canvas widget - runtime 
ii  libaudiofile0      0.2.6-6               Open-source version of SGI's audio
ii  libc6              2.3.2.ds1-22sarge3    GNU C Library: Shared libraries an
ii  libdb3             3.2.9-22              Berkeley v3 Database Libraries [ru
ii  libesd-alsa0 [libe 0.2.35-2              Enlightened Sound Daemon (ALSA) - 
ii  libglib1.2         1.2.10-9              The GLib library of C routines
ii  libgnome32         1.4.2-19              The GNOME libraries
ii  libgnomesupport0   1.4.2-19              The GNOME libraries (Support libra
ii  libgnomeui32       1.4.2-19              The GNOME libraries (User Interfac
ii  libgnorba27        1.4.2-19              GNOME CORBA services
ii  libgtk1.2          1.2.10-17             The GIMP Toolkit set of widgets fo
ii  libjpeg62          6b-10                 The Independent JPEG Group's JPEG 
ii  liborbit0          0.5.17-11.1           Libraries for ORBit - a CORBA ORB
ii  libpng2            1.0.18-1              PNG library, older version - runti
ii  libtiff3g          3.5.5-6.woody5        Tag Image File Format library
ii  libungif4g         4.1.3-2sarge1         shared library for GIF images (run
ii  libwrap0           7.6.dbs-8             Wietse Venema's TCP wrappers libra
ii  xlibs              4.3.0.dfsg.1-14sarge1 X Keyboard Extension (XKB) configu
ii  zlib1g             1:1.2.2-4.sarge.2     compression library - runtime

-- no debconf information

-- 
Andrea Mennucc
diff -ur gnome-pim-1.4.9/gncal/calobj.c gnome-pim-1.4.9~mine/gncal/calobj.c
--- gnome-pim-1.4.9/gncal/calobj.c      2002-04-18 19:50:07.000000000 +0200
+++ gnome-pim-1.4.9~mine/gncal/calobj.c 2006-05-24 17:01:33.000000000 +0200
@@ -502,7 +502,22 @@
 }
 
 #define is_a_prop_of(obj,prop) isAPropertyOf (obj,prop)
-#define str_val(obj) the_str = fakeCString (vObjectUStringZValue (obj))
+
+
+char *str_val__(VObject *vo) 
+{
+  char *the_str;
+  const wchar_t *u =vObjectUStringZValue (vo);
+  if(u)
+    the_str = fakeCString (u);
+  else {
+    printf("gran casotto!");
+    the_str = fakeCString ("");
+  }
+  return  the_str;
+}
+
+#define str_val(obj) (the_str = str_val__(obj))
 #define has(obj,prop) (vo = isAPropertyOf (obj, prop))
 
 /*
diff -ur gnome-pim-1.4.9/libversit/vobject.c 
gnome-pim-1.4.9~mine/libversit/vobject.c
--- gnome-pim-1.4.9/libversit/vobject.c 2002-06-15 23:47:06.000000000 +0200
+++ gnome-pim-1.4.9~mine/libversit/vobject.c    2006-05-24 16:54:34.000000000 
+0200
@@ -1446,6 +1446,8 @@
 DLLEXPORT(char*) fakeCString(const wchar_t *u)
 {
     char *s, *t;
+    if ( u == 0)
+      { printf("gran casino"); return NULL; }
     int len = uStrLen(u) + 1;
 
     if (!u)

Reply via email to