Skip Menu |
 

From: epeisach@mit.edu
Subject: CVS Commit
In line 570, in reallocating the plugin tree - the memory allocated is
(count + 1) + sizeof(*p)

instead of

(count +1 ) * sizeof(*p)

Detected while running the krb5kdc under valgrind with memcheck.


Commit By: epeisach



Revision: 18070
Changed Files:
U trunk/src/util/support/plugins.c
Date: Wed, 31 May 2006 20:12:23 -0500
From: Will Fiveash <William.Fiveash@sun.com>
To: rt@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #3825] CVS Commit
RT-Send-Cc:
I still see in plugins.c:

$ grep 'count.* + sizeof' src/util/support/plugins.c
newp = realloc (p, ((count + 1) + sizeof (*p))); /* +1 for NULL */

Isn't this a problem also?

On Wed, May 31, 2006 at 08:56:21PM -0400, Ezra Peisach via RT wrote:
Show quoted text
> In line 570, in reallocating the plugin tree - the memory allocated is
> (count + 1) + sizeof(*p)
>
> instead of
>
> (count +1 ) * sizeof(*p)
>
> Detected while running the krb5kdc under valgrind with memcheck.
>
>
> Commit By: epeisach
>
>
>
> Revision: 18070
> Changed Files:
> U trunk/src/util/support/plugins.c
>
> _______________________________________________
> krb5-bugs mailing list
> krb5-bugs@mit.edu
> https://mailman.mit.edu/mailman/listinfo/krb5-bugs

--
Will Fiveash
Sun Microsystems Inc.
Austin, TX, USA (TZ=CST6CDT)
From: epeisach@mit.edu
Subject: CVS Commit
Missed a reference to + sizeof() vs * sizeof(). Pointed out by
william fiveash.


Commit By: epeisach



Revision: 18071
Changed Files:
U trunk/src/util/support/plugins.c
Date: Wed, 31 May 2006 21:42:44 -0400 (EDT)
From: Ezra Peisach <epeisach@MIT.EDU>
To: "william.fiveash@sun.com via RT" <rt-comment@krbdev.mit.edu>
Subject: Re: [krbdev.mit.edu #3825] CVS Commit
RT-Send-Cc:

You are correct - I missed that point in the code... I fixed the one found
by valgrind - but failed to check the rest of the code for pitfalls.

Thanks - it is fixed now in the tree...

Ezra