Subject: Re: bin/30618
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,>
From: Efstathios Kamperis <ekamperi@auth.gr>
List: netbsd-bugs
Date: 11/25/2006 04:25:03
The following reply was made to PR bin/30618; it has been noted by GNATS.

From: Efstathios Kamperis <ekamperi@auth.gr>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: bin/30618
Date: Sat, 25 Nov 2006 06:22:16 +0200

 This message is in MIME format.
 
 --=_57trcaxh0sg0
 Content-Type: text/plain;
 	charset=ISO-8859-1;
 	DelSp="Yes";
 	format="flowed"
 Content-Disposition: inline
 Content-Transfer-Encoding: 8bit
 
 Dear Sir or Madam,
 
 in view of the upcoming NetBSD Hackathon, I solved a minor bug (30618)
 in info(1). The problem was that in the special case where item=0, the
 entry pointer was never  assigned a value, leading to a null pointer
 dereference a few lines later.
 
 I attach you the patch that solves this issue.
 
 Please feel free to contact me in case you need further clarification.
 
 Yours faithfully,
 Stathis Kamperis,
 Student of Medicine,
 GREECE
 
 ----------------------------------------------------------------
 This message was sent using IMP, the Internet Messaging Program.
 
 
 --=_57trcaxh0sg0
 Content-Type: text/x-patch;
 	charset=ISO-8859-1;
 	name="info.patch"
 Content-Disposition: attachment;
 	filename="info.patch"
 Content-Transfer-Encoding: 8bit
 
 --- a/gnu/dist/texinfo/info/session.c	2006-11-24 22:19:40.000000000 +0000
 +++ b/gnu/dist/texinfo/info/session.c	2006-11-24 22:21:27.000000000 +0000
 @@ -1961,7 +1961,7 @@
  
    /* Special case.  Item "0" is the last item in this menu. */
    if (item == 0)
 -    for (i = 0; menu[i + 1]; i++);
 +    for (i = 0; (entry = menu[i]) && menu[i + 1]; i++);
    else
      {
        for (i = 0; (entry = menu[i]); i++)
 
 --=_57trcaxh0sg0--