hobbit-mailack Segmentation fault
list Peter Jakobs
Hi, Running on a debian sarge, I tried the beta and the RC, but when I try to use the hobbit-mailack I get an segmentation fault. Any ideas?? Peter Jakobs hobbit at gefil016:~$ /home/hobbit/server/bin/hobbit-mailack --env=/home/hobbit/server/etc/hobbitserver.cfg --debug Re: Hobbit [601931] toscdc01:ntp CRITICAL (RED) 2006-07-17 08:28:25 Subject-line not found hobbit at gefil016:~$ /home/hobbit/server/bin/hobbit-mailack --env=/home/hobbit/server/etc/hobbitserver.cfg --debug Subject: Re: Hobbit [601931] toscdc01:ntp CRITICAL (RED) Segmentation fault hobbit at gefil016:~$ /home/hobbit/server/bin/hobbit-mailack --env=/home/hobbit/server/etc/hobbitserver.cfg --debug Subject: Re: Hobbit [601931] toscdc01:ntp CRITICAL (RED) what is going on Segmentation fault 2006-07-17 08:25:46 1G2MY6-0000GB-KO ** | /home/hobbit/server/bin/hobbit-mailack --env=/home/hobbit/server/etc/hobbitserver.cfg <user-c2db3bd0ab6b@xymon.invalid> R=userforward T=address_pipe: Child process of address_pipe transport (running command "/home/hobbit/server/bin/hobbit-mailack --env=/home/hobbit/server/etc/hobbitserver.cfg") was terminated by signal 11 (Segmentation fault) 2006-07-17 08:25:46 1G2MY6-0000GH-PF <= <> R=1G2MY6-0000GB-KO U=Debian-exim P=local S=2169
list Henrik Størner
▸
On Mon, Jul 17, 2006 at 08:33:17AM +0200, Peter wrote:
Hi, Running on a debian sarge, I tried the beta and the RC, but when I try to use the hobbit-mailack I get an segmentation fault. Any ideas??
Try feeding it a real mail. I.e. input with a "From" and "Subject" header, followed by a blank line, and then some text. It shouldn't crash, though - the attached patch should fix that. Regards, Henrik -------------- next part -------------- --- hobbitd/hobbit-mailack.c 2006/05/19 12:02:55 1.17 +++ hobbitd/hobbit-mailack.c 2006/07/17 09:38:51 @@ -12,7 +12,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: hobbit-mailack.c,v 1.17 2006/05/19 12:02:55 henrik Exp $"; +static char rcsid[] = "$Id: hobbit-mailack.c,v 1.18 2006/07/17 09:38:45 henrik Exp $"; #include <ctype.h> #include <stdio.h> @@ -152,6 +152,7 @@ /* Setup the acknowledge message */ if (duration == 0) duration = 60; /* Default: Ack for 60 minutes */ + if (firsttxtline == NULL) firsttxtline = "<No cause specified>"; ackbuf = (char *)malloc(4096 + strlen(firsttxtline) + (fromline ? strlen(fromline) : 0)); p = ackbuf; p += sprintf(p, "hobbitdack %s %d %s", cookie, duration, firsttxtline);
list Peter Jakobs
Thanks, the patch did the job. Now the mails from our lotus notes system do the acknowledge. I also tried with the From: and Subject: and the blank line, it was working, but the segmentation fault was there with the mails from our mail system. Peter Jakobs
▸
-----Original Message-----
From: user-ce4a2c883f75@xymon.invalid (Henrik Stoerner)
To: user-ae9b8668bcde@xymon.invalid
Date: Mon, 17 Jul 2006 11:39:57 +0200
Subject: Re: [hobbit] hobbit-mailack Segmentation fault
On Mon, Jul 17, 2006 at 08:33:17AM +0200, Peter wrote:Hi, Running on a debian sarge, I tried the beta and the RC, but when I try to use the hobbit-mailack I get an segmentation fault. Any ideas??
Try feeding it a real mail. I.e. input with a "From" and "Subject" header, followed by a blank line, and then some text. It shouldn't crash, though - the attached patch should fix that. Regards, Henrik