[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Segmentation fault w/ Gnats 4.0.1
From: |
Pankaj Garg |
Subject: |
Segmentation fault w/ Gnats 4.0.1 |
Date: |
Thu, 18 Nov 2004 09:04:44 -0800 |
I recently downloaded Gnats 4.0.1 and installed it on a
vine linux (vinelinux.org) and got a segmentation fault
while the gnats server was initializing.
It seems the error occurs when gnatds is trying to
read the 'responsbile' file. I hacked a fix
by using the following change:
--- mail.c 2002-11-25 22:58:33.000000000 +0900
+++ ../../gnats-4.0.1.new/gnats/mail.c 2004-11-17 07:07:14.000000000
+0900
@@ -231,7 +231,10 @@ getOneAddress (const char **addrPtr)
addr--;
}
- res = xstrndup (addrStart, addr - addrStart);
+ if (addr <= addrStart)
+ res = NULL;
+ else
+ res = xstrndup (addrStart, addr - addrStart);
*addrPtr = (*addrEnd == '\0') ? NULL : addrEnd+1;
return res;
Haven't had a chance to explore further, but it seems that
the problem was happening when there was only an '\n' for
the third field (address) in the responsible file. Seems like the
isspace logic is somehow getting messed up. Before I dig deeper,
just wanted to see if someone else has experienced anything like this.
Pankaj
--
Pankaj K Garg garg@zeesource.net
1684 Nightingale Avenue 408-373-4027
Suite 201 408-733-2737(fax)
Sunnyvale, CA 94087 http://www.zeesource.net
- Segmentation fault w/ Gnats 4.0.1,
Pankaj Garg <=