Package: pal
Version: 0.3.5-1pre1
Severity: normal
Tags: patch

Hi,

please check whether term is NULL in colorize.c

1:[EMAIL PROTECTED]:~> crontab -l | grep palmail
# /home/carsten/etc/crontab/palmail.crontab
45 3 * * * nice $HOME/bin/palmail
2:[EMAIL PROTECTED]:~> cat =palmail
#!/bin/sh
DAYS=21
if [ -n "`pal -c 0 -r $DAYS`" ]
then
    pal -c 0 -r $DAYS --mail | /usr/sbin/sendmail "$(id -un)"
fi

I get everyday a mail like this:
(process:31832): GLib-CRITICAL **: g_ascii_strncasecmp: assertion `s1 != NULL' 
faile
(process:31832): GLib-CRITICAL **: g_ascii_strncasecmp: assertion `s1 != NULL' 
failed


The attached patch fixes this problem. Upstream did already fix this bug
in the current development version.

Regards,
Carsten
--- src/colorize.c.org	2007-07-01 23:32:10.000000000 +0200
+++ src/colorize.c	2007-07-01 23:36:31.000000000 +0200
@@ -37,6 +37,9 @@
 {
     char *term = getenv("TERM");
 
+    if (term == NULL)
+        return;
+
     use_colors = 0;  /* don't use colors by default */
 
     /* use colors if TERM variable is one of the following */

Reply via email to