[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r32531 - trunk/subversion/libsvn_subr

From: Greg Stein <gstein_at_gmail.com>
Date: Mon, 18 Aug 2008 19:27:07 -0700

hehe... sorry for the bad example code :-P

On Aug 18, 2008, at 17:22, hwright_at_tigris.org wrote:

> Author: hwright
> Date: Mon Aug 18 17:22:01 2008
> New Revision: 32531
>
> Log:
> Properly set a pointer, thereby eliminating some memory clobbering.
> Followup to r32530.
>
> * subversion/libsvn_subr/checksum.c
> (svn_checksum_create): Set the digest pointer to the end of the
> checksum
> structure, which is the start of the digest memory area.
>
> Modified:
> trunk/subversion/libsvn_subr/checksum.c
>
> Modified: trunk/subversion/libsvn_subr/checksum.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_subr/checksum.c?pathrev=32531&r1=32530&r2=32531
> ===
> ===
> ===
> =====================================================================
> --- trunk/subversion/libsvn_subr/checksum.c Mon Aug 18 15:20:36
> 2008 (r32530)
> +++ trunk/subversion/libsvn_subr/checksum.c Mon Aug 18 17:22:01
> 2008 (r32531)
> @@ -54,7 +54,7 @@ svn_checksum_create(svn_checksum_kind_t
> case svn_checksum_md5:
> case svn_checksum_sha1:
> checksum = apr_pcalloc(pool, sizeof(*checksum) +
> DIGESTSIZE(kind));
> - checksum->digest = (unsigned char *)checksum +
> DIGESTSIZE(kind);
> + checksum->digest = (unsigned char *)checksum +
> sizeof(*checksum);
> checksum->kind = kind;
> return checksum;
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: svn-help_at_subversion.tigris.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-08-19 04:27:31 CEST

This is an archived mail posted to the Subversion Dev mailing list.