Bug#518867: fluxconf: fluxmenu crashes when i save menu and it deletes the file

2009-03-22 Thread Denis Briand
I found the problem :
In fluxmenu.c the g_locale_from_utf8() function try to convert a string
from utf8 encoding. But the string can be NULL, and fluxmenu crash.
So I built a short patch to check if the string isn't empty before to
launch g_local_from_utf8() on it.
You can find it attached to that e-mail.

Best regards

Denis Briand
--- fluxmenu.c.orig	2008-08-11 12:51:38.0 +0200
+++ fluxmenu.c	2009-03-23 02:46:10.0 +0100
@@ -382,10 +382,14 @@
 gtk_tree_model_get(GTK_TREE_MODEL(store), iter, TYPE, pre, TITRE, deuz, VALEUR, troiz, ICONE, quatr, -1); /* Do something with the data */
 for (i = 0; i  indent; i++)
 putc(' ', fd);
-pre = g_locale_from_utf8(pre,-1,0,0,0);
-deuz = g_locale_from_utf8(deuz,-1,0,0,0);
-troiz = g_locale_from_utf8(troiz,-1,0,0,0);
-quatr = g_locale_from_utf8(quatr,-1,0,0,0);
+if (pre)
+			pre = g_locale_from_utf8(pre,-1,0,0,0);
+if (deuz)
+			deuz = g_locale_from_utf8(deuz,-1,0,0,0);
+if (troiz)
+			troiz = g_locale_from_utf8(troiz,-1,0,0,0);
+if (quatr)
+			quatr = g_locale_from_utf8(quatr,-1,0,0,0);
 fprintf(fd, %s%s%s %s%s%s %s%s%s %s%s%s\n, 
 pre ? [ : , pre ? pre : , pre ? ] : ,
 deuz ? ( : , deuz ? deuz : , deuz ? ) : , 


signature.asc
Description: Digital signature


Bug#518867: fluxconf: fluxmenu crashes when i save menu and it deletes the file

2009-03-08 Thread steph
Package: fluxconf
Version: 0.9.9.2-2
Severity: grave
Justification: renders package unusable

When i save the modifications of my fluxbox menu in fluxmenu, it crashes:

fluxmenu[25340]: segfault at 0 ip 7f96dfc0aca0 sp 7fffe9cd1528
 error 4 in libglib-2.0.so.0.1800.4[7f96dfba2000+c2000]

This crash deletes content of menu leaving an empty file.
This appears only when i add lines in my menu not when i delete or just
modify a line.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (998, 'testing'), (100, 'experimental'), (100, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages fluxconf depends on:
ii  libatk1.0-0   1.22.0-1   The ATK accessibility toolkit
ii  libc6 2.9-4  GNU C Library: Shared libraries
ii  libcairo2 1.8.6-2The Cairo 2D vector graphics libra
ii  libglib2.0-0  2.18.4-2   The GLib library of C routines
ii  libgtk2.0-0   2.12.12-1  The GTK+ graphical user interface 
ii  libpango1.0-0 1.22.4-2   Layout and rendering of internatio

Versions of packages fluxconf recommends:
ii  fluxbox   1.1.1-1Highly configurable and low resour

fluxconf suggests no packages.

-- no debconf information




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org