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

Bug#97918: marked as done (malloc-bug in rpcgen (netkit-base-0.10-6.1))



Your message dated Sun, 23 Mar 2003 00:46:40 +0900
with message-id <80bs03l7z3.wl@oris.opensource.jp>
and subject line malloc-bug in rpcgen (netkit-base-0.10-6.1)
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 18 May 2001 11:15:19 +0000
>From michael.haubenwallner@salomon.at Fri May 18 06:15:19 2001
Return-path: <michael.haubenwallner@salomon.at>
Received: from mailhost.salomon.at (sauxa.salomon.at) [192.64.28.5] (root)
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 150iE2-0005xR-00; Fri, 18 May 2001 06:15:18 -0500
Received: from salomon.at (haubi@sapc154.salomon.at [192.64.28.217])
	by sauxa.salomon.at (8.9.3 (PHNE_18979)/8.8.6) with ESMTP id NAA26222;
	Fri, 18 May 2001 13:15:15 +0200 (METDST)
Sender: haubi@salomon.at
Message-ID: <3B05042C.43F5023C@salomon.at>
Date: Fri, 18 May 2001 13:14:52 +0200
From: Michael Haubenwallner <michael.haubenwallner@salomon.at>
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.18 i686)
X-Accept-Language: de-AT, en
MIME-Version: 1.0
To: submit@bugs.debian.org
Subject: Re: malloc-bug in rpcgen (netkit-base-0.10-6.1)
References: <3B04F8C1.53D3F7F0@salomon.at>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Delivered-To: submit@bugs.debian.org

Package: netbase
Version: 3.18-4

Hello!

Please excuse me some formal mistakes, i am not really
familiar with reporting bugs to you :)
The missing package-header in the previous mail
was such one, sorry.

Here's the problem i had on my potato-distribution
with kernel 2.2.18 and netbase-package version 3.18-4.

While i have set MALLOC_CHECK_=2 in my environment,
the rpcgen abort's when creating the xdr-file and the
xdr-File contains a struct where some fields can
be inline'd:

$ uname -a
Linux sapc154 2.2.18 #6 Thu Apr 12 17:05:24 CEST 2001 i686 unknown
$ cat test.x
struct _MYSTRUCT {
    long Val1;
    long StopReq;
    long StopArg;
    long StopCountDown;
};
$ export MALLOC_CHECK_=2
$ rpcgen -c test.x
/*
 * Please do not edit this file.
.
.
.
          }
          else {
                 IXDR_PUT_LONG(buf,objp->Val1);
Aborted
$ unset MALLOC_CHECK_
$ rpcgen -c test.x
/*
 * Please do not edit this file.
.
.
.
         }
        return (TRUE);
}


So i found the source for this in file netkit-base_0.10.orig.tar.gz
at http://ftp.debian.org/debian/pool/main/n/netkit-base/
patched in the file netkit-base_0.10-6.1.diff.gz and debugged rpcgen.

Hope this is the right source.

The problem i found is that in
file rpc_cout.c line 707 should be changed
from
    ptr = malloc(strlen(str));
to
    ptr = malloc(strlen(str)+1);

Greetings
  Michael Haubenwallner

---------------------------------------
Received: (at 97918-done) by bugs.debian.org; 22 Mar 2003 15:46:42 +0000
>From gotom@debian.or.jp Sat Mar 22 09:46:42 2003
Return-path: <gotom@debian.or.jp>
Received: from oris.opensource.jp (oris.opensource.gr.jp) [218.44.239.73] (postfix)
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 18wlCj-0005r4-00; Sat, 22 Mar 2003 09:46:41 -0600
Received: from oris.opensource.jp (oris.opensource.jp [218.44.239.73])
	by oris.opensource.gr.jp (Postfix) with ESMTP id 6C84AC33C6
	for <97918-done@bugs.debian.org>; Sun, 23 Mar 2003 00:46:40 +0900 (JST)
Date: Sun, 23 Mar 2003 00:46:40 +0900
Message-ID: <80bs03l7z3.wl@oris.opensource.jp>
From: GOTO Masanori <gotom@debian.or.jp>
To: 97918-done@bugs.debian.org
Subject: Re: malloc-bug in rpcgen (netkit-base-0.10-6.1)
User-Agent: Wanderlust/2.9.9 (Unchained Melody) SEMI/1.14.3 (Ushinoya)
 FLIM/1.14.3 (=?ISO-8859-4?Q?Unebigory=F2mae?=) APEL/10.3 Emacs/21.2
 (i386-debian-linux-gnu) MULE/5.0 (SAKAKI)
MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya")
Content-Type: text/plain; charset=US-ASCII
Delivered-To: 97918-done@bugs.debian.org
X-Spam-Status: No, hits=-0.8 required=4.0
	tests=QUOTED_EMAIL_TEXT,SPAM_PHRASE_01_02,USER_AGENT
	version=2.44
X-Spam-Level: 

> Please excuse me some formal mistakes, i am not really
> familiar with reporting bugs to you :)
> The missing package-header in the previous mail
> was such one, sorry.
> 
> Here's the problem i had on my potato-distribution
> with kernel 2.2.18 and netbase-package version 3.18-4.
> 
> While i have set MALLOC_CHECK_=2 in my environment,
> the rpcgen abort's when creating the xdr-file and the
> xdr-File contains a struct where some fields can
> be inline'd:
> 
> $ uname -a
> Linux sapc154 2.2.18 #6 Thu Apr 12 17:05:24 CEST 2001 i686 unknown
> $ cat test.x
> struct _MYSTRUCT {
>     long Val1;
>     long StopReq;
>     long StopArg;
>     long StopCountDown;
> };
> $ export MALLOC_CHECK_=2
> $ rpcgen -c test.x
> /*
>  * Please do not edit this file.
> .
> .
> .
>           }
>           else {
>                  IXDR_PUT_LONG(buf,objp->Val1);
> Aborted
> $ unset MALLOC_CHECK_
> $ rpcgen -c test.x
> /*
>  * Please do not edit this file.
> .
> .
> .
>          }
>         return (TRUE);
> }
> 
> 
> So i found the source for this in file netkit-base_0.10.orig.tar.gz
> at http://ftp.debian.org/debian/pool/main/n/netkit-base/
> patched in the file netkit-base_0.10-6.1.diff.gz and debugged rpcgen.
> 
> Hope this is the right source.
> 
> The problem i found is that in
> file rpc_cout.c line 707 should be changed
> from
>     ptr = malloc(strlen(str));
> to
>     ptr = malloc(strlen(str)+1);

Thanks for your report, this bug was fixed already:

	2001-09-04  Jakub Jelinek  <jakub@redhat.com>
	
	        * sunrpc/rpc_cout.c (upcase): Account for trailing '\0'.

	diff -u -r1.12 -r1.13
	--- sunrpc/rpc_cout.c   28 Dec 2000 10:22:08 -0000      1.12
	+++ sunrpc/rpc_cout.c   5 Sep 2001 00:07:01 -0000       1.13
	@@ -32,7 +32,7 @@
	  * From: @(#)rpc_cout.c 1.13 89/02/22 (C) 1987 SMI
	  */
	 char cout_rcsid[] =
	-"$Id: rpc_cout.c,v 1.12 2000/12/28 10:22:08 aj Exp $";
	+"$Id: rpc_cout.c,v 1.13 2001/09/05 00:07:01 drepper Exp $";
	 
	 /*
	  * rpc_cout.c, XDR routine outputter for the RPC protocol compiler
	@@ -801,7 +801,7 @@
	 upcase (const char *str)
	 {
	   char *ptr, *hptr;
	-  ptr = malloc (strlen (str));
	+  ptr = malloc (strlen (str) + 1);
	   if (ptr == NULL)
	     {
	       f_print (stderr, "malloc failed\n");

I close this bug.

Regards,
-- gotom



Reply to: