public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug corefiles/15974] New: Unsupported notification packets are causing errors (last of the nc_list is picked).
@ 2013-09-23 14:14 forum at emblocks dot org
  2013-09-24  4:36 ` [Bug corefiles/15974] " forum at emblocks dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: forum at emblocks dot org @ 2013-09-23 14:14 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=15974

            Bug ID: 15974
           Summary: Unsupported notification packets are causing errors
                    (last of the nc_list is picked).
           Product: gdb
           Version: 7.6
            Status: NEW
          Severity: critical
          Priority: P2
         Component: corefiles
          Assignee: unassigned at sourceware dot org
          Reporter: forum at emblocks dot org

In the file remote-notif.c:




/* Supported clients of notifications.  */

static struct notif_client *notifs[] =
{
  &notif_client_stop,
};


  for (i = 0; i < ARRAY_SIZE (notifs); i++)
    {
      nc = notifs[i];
      if (strncmp (buf, nc->name, strlen (nc->name)) == 0
      && buf[strlen (nc->name)] == ':')
    break;
    }

  /* We ignore notifications we don't recognize, for compatibility
     with newer stubs.  */
  if (nc == NULL)
    return;


If the notification packet is not in the list then the last (in this case the
only) entry is used as valid. It should be NULL and break away.

Solution:
- terminate the list with NULL
- or make the iteration through the list error-proof.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-12-13 16:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-23 14:14 [Bug corefiles/15974] New: Unsupported notification packets are causing errors (last of the nc_list is picked) forum at emblocks dot org
2013-09-24  4:36 ` [Bug corefiles/15974] " forum at emblocks dot org
2013-09-24 10:12 ` qiyao at gcc dot gnu.org
2013-09-24 10:27 ` forum at emblocks dot org
2013-11-30  3:40 ` [Bug remote/15974] " qiyao at gcc dot gnu.org
2013-12-02  6:47 ` cvs-commit at gcc dot gnu.org
2013-12-02  6:55 ` qiyao at gcc dot gnu.org
2013-12-11  1:41 ` cvs-commit at gcc dot gnu.org
2013-12-13 16:52 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).