]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Fix PR remote/15974
authorYao Qi <yao@codesourcery.com>
Thu, 15 Aug 2013 01:09:08 +0000 (09:09 +0800)
committerYao Qi <yao@codesourcery.com>
Mon, 2 Dec 2013 06:44:14 +0000 (14:44 +0800)
commit62972e0b66f4247f56c795ee55bc0825933a7bed
treeeda7005f3e1f7abcee6f0410243df61edecbd018
parentf9b0da3d5833ad5f809422f3084b0ef8fa5c5762
Fix PR remote/15974

In remote-notif.c:handle_notification, we have a loop,

  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 is not in the list 'notifs', the last entry is
used, which is wrong.  It should be NULL.  This patch fixes it.

gdb:

2013-12-02  Pedro Alves  <palves@redhat.com>

PR remote/15974
* remote-notif.c (handle_notification): Return early if no
notification is found.
gdb/ChangeLog
gdb/remote-notif.c