From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6241 invoked by alias); 23 Sep 2013 14:14:26 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 6190 invoked by uid 48); 23 Sep 2013 14:14:26 -0000 From: "forum at emblocks dot org" To: gdb-prs@sourceware.org Subject: [Bug corefiles/15974] New: Unsupported notification packets are causing errors (last of the nc_list is picked). Date: Mon, 23 Sep 2013 14:14:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: corefiles X-Bugzilla-Version: 7.6 X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: forum at emblocks dot org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-q3/txt/msg00385.txt.bz2 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[] = { ¬if_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.