Allocate one more char for string sentinel. (#692135)
From: Radek Vykydal <rvykydal@redhat.comuser>
Adding last fragment sum to the string causes corruption of mediasum value and check fail. --- libcheckisomd5.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libcheckisomd5.c b/libcheckisomd5.c index afcd198..8bca842 100644 --- a/libcheckisomd5.c +++ b/libcheckisomd5.c @@ -189,8 +189,8 @@ static int checkmd5sum(int isofd, char *mediasum, char *computedsum, checkCallba unsigned int len; unsigned char *buf; long long isosize, offset, pvd_offset, apoff; - char fragmentsums[FRAGMENT_SUM_LENGTH]; - char thisfragsum[FRAGMENT_SUM_LENGTH]; + char fragmentsums[FRAGMENT_SUM_LENGTH+1]; + char thisfragsum[FRAGMENT_SUM_LENGTH+1]; long long fragmentcount = 0; MD5_CTX md5ctx, fragmd5ctx; -- 1.7.4 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@redhat.com https://www.redhat.com/mailman/listinfo/anaconda-devel-list |
Allocate one more char for string sentinel. (#692135)
On 04/07/2011 01:00 PM, Radek Vykydal wrote:
From: Radek Vykydal<rvykydal@redhat.comuser> Adding last fragment sum to the string causes corruption of mediasum value and check fail. --- libcheckisomd5.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libcheckisomd5.c b/libcheckisomd5.c index afcd198..8bca842 100644 --- a/libcheckisomd5.c +++ b/libcheckisomd5.c @@ -189,8 +189,8 @@ static int checkmd5sum(int isofd, char *mediasum, char *computedsum, checkCallba unsigned int len; unsigned char *buf; long long isosize, offset, pvd_offset, apoff; - char fragmentsums[FRAGMENT_SUM_LENGTH]; - char thisfragsum[FRAGMENT_SUM_LENGTH]; + char fragmentsums[FRAGMENT_SUM_LENGTH+1]; + char thisfragsum[FRAGMENT_SUM_LENGTH+1]; long long fragmentcount = 0; MD5_CTX md5ctx, fragmd5ctx; Looks good. Ales _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@redhat.com https://www.redhat.com/mailman/listinfo/anaconda-devel-list |
Allocate one more char for string sentinel. (#692135)
ack
On Thu, 2011-04-07 at 13:00 +0200, Radek Vykydal wrote: > From: Radek Vykydal <rvykydal@redhat.comuser> > > Adding last fragment sum to the string causes corruption > of mediasum value and check fail. > --- > libcheckisomd5.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libcheckisomd5.c b/libcheckisomd5.c > index afcd198..8bca842 100644 > --- a/libcheckisomd5.c > +++ b/libcheckisomd5.c > @@ -189,8 +189,8 @@ static int checkmd5sum(int isofd, char *mediasum, char *computedsum, checkCallba > unsigned int len; > unsigned char *buf; > long long isosize, offset, pvd_offset, apoff; > - char fragmentsums[FRAGMENT_SUM_LENGTH]; > - char thisfragsum[FRAGMENT_SUM_LENGTH]; > + char fragmentsums[FRAGMENT_SUM_LENGTH+1]; > + char thisfragsum[FRAGMENT_SUM_LENGTH+1]; > long long fragmentcount = 0; > MD5_CTX md5ctx, fragmd5ctx; > -- Martin Gracik <mgracik@redhat.com> _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@redhat.com https://www.redhat.com/mailman/listinfo/anaconda-devel-list Thu Apr 7 13:30:01 2011 Return-path: <gentoo-dev+bounces-45215-tom=linux-archive.org@lists.gentoo.org> Envelope-to: tom@linux-archive.org Delivery-date: Thu, 07 Apr 2011 12:56:18 +0300 Received: from pigeon.gentoo.org ([208.92.234.80]:37376 helo=lists.gentoo.org) by s2.java-tips.org with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from <gentoo-dev+bounces-45215-tom=linux-archive.org@lists.gentoo.org>) id 1Q7lwo-00042Q-IX for tom@linux-archive.org; Thu, 07 Apr 2011 12:56:18 +0300 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9B402E0794; Thu, 7 Apr 2011 11:11:55 +0000 (UTC) X-Original-To: gentoo-dev@lists.gentoo.org Delivered-To: gentoo-dev@lists.gentoo.org Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 54015E0525 for <gentoo-dev@lists.gentoo.org>; Thu, 7 Apr 2011 11:09:21 +0000 (UTC) Received: from [192.168.1.100] (unknown [78.110.211.180]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: fordfrog) by smtp.gentoo.org (Postfix) with ESMTPSA id 7D0201B4126 for <gentoo-dev@lists.gentoo.org>; Thu, 7 Apr 2011 11:09:20 +0000 (UTC) Message-ID: <4D9D9B5A.9040604@gentoo.org> Date: Thu, 07 Apr 2011 13:09:14 +0200 From: =?ISO-8859-2?Q?=22Miroslav_=A9ulc_=28fordfrog=29=22?= <fordfrog@gentoo.org> User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110321 Lightning/1.0b3pre Thunderbird/3.1.9 Precedence: bulk List-Post: <mailto:gentoo-dev@lists.gentoo.org> List-Help: <mailto:gentoo-dev+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-dev+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org> X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] Can't update/checkout gentoo-x86 repo X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 hi, today i tried to update my local copy of gentoo-x86 cvs repo but the update failed with this error: cvs [checkout aborted]: Could not map memory to RCS archive /var/cvsroot/gentoo-x86/profiles/package.mask,v: Invalid argument so i tried clean checkout instead, but got the same error. any idea what might be wrong? miroslav -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2dm1oACgkQB6q7Q15RwyBG+gCeIUjyU5zKfC mTVWxlKD4ZheAh KA4An0TBGkOrBG+2Nt9CtcuYWBe/dzNe =lDpK -----END PGP SIGNATURE----- |
| All times are GMT. The time now is 06:19 PM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.