bug-gnats
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SEGV in gnatsd v3.113 (includes patch)


From: Robert Lupton the Good
Subject: SEGV in gnatsd v3.113 (includes patch)
Date: Mon, 29 Jan 2001 16:51:25 -0500 (EST)

Here's a patch to gnatsd.

If the
        X-GNATS-Notify:
field is present but empty,
        raw_header_value (X_GNATS_NOTIFY)
returns "", and the strchr returns NULL, followed by a SEGV.

This patch is against the latest gnats-v3-branch version.



                                        R



ta:gnats>cvs status cmds.c
===================================================================
File: cmds.c            Status: Locally Modified

   Working revision:    1.3
   Repository revision: 1.3     /cvs/gnats/gnats/gnats/cmds.c,v
   Sticky Tag:          gnats-v3-branch (branch: 1.3.6)
   Sticky Date:         (none)
   Sticky Options:      -ko

ta:gnats>cvs diff cmds.c 
Index: cmds.c
===================================================================
RCS file: /cvs/gnats/gnats/gnats/cmds.c,v
retrieving revision 1.3
diff -a -c -r1.3 cmds.c
*** cmds.c      1999/03/17 23:45:36     1.3
--- cmds.c      2001/01/29 21:46:48
***************
*** 798,804 ****
        h = raw_header_value (X_GNATS_NOTIFY);
        if (h)
        {
!         char *h2 = strchr (h, '\n'); h2[0] = '\0';
          addrs[naddrs++] = strdup (h);
        }
        addrs[naddrs] = NULL;
--- 798,808 ----
        h = raw_header_value (X_GNATS_NOTIFY);
        if (h)
        {
!         char *h2 = strchr (h, '\n');
!         if (h2 != NULL)
!           {
!              h2[0] = '\0';
!           }
          addrs[naddrs++] = strdup (h);
        }
        addrs[naddrs] = NULL;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]