This is the mail archive of the cygwin-apps mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Aug 4 20:34, Achim Gratz wrote: > Achim Gratz writes: > > Pushed. > > I've found another (and hopefully the last, except for the mostly > dormant gzip code) 16kiB buffer to be increased to 64kiB. Also, when > installing from a local directory without a setup.ini file there > actually is a need to skip the checksum validation. For this to work we > also need to record whether we actually set a checksum and testing the > first byte for zero is not correct for doing this. As detailed in the > design for Bitcoin, there is an exponetnially decreasing probability for > the leading bits to all be zero. Current Cygwin has more than 80 > packages with the first eight bits or more all zero (I've seen 15 > leading zero bits in my local mirror). > > >From 9de3a769ae38b1e54ec99e5f105f832a74becfab Mon Sep 17 00:00:00 2001 > From: Achim Gratz <...> > Date: Tue, 4 Aug 2015 19:39:23 +0200 > Subject: [PATCH 1/2] Increase read buffer size for MD5 checksumming to 64kiB > > * install.cc (md5_one): Change buffer size from 16kiB to 64kiB for > faster reading. Acked. > >From d2f2501580391154fbd5331a932271ce17880680 Mon Sep 17 00:00:00 2001 > From: Achim Gratz <...> > Date: Tue, 4 Aug 2015 19:48:56 +0200 > Subject: [PATCH 2/2] Properly record SHA512 checksum presence and skip > validation for ad-hoc installs > > diff --git a/IniDBBuilderPackage.cc b/IniDBBuilderPackage.cc > index 7ee2af4..b41955a 100644 > --- a/IniDBBuilderPackage.cc > +++ b/IniDBBuilderPackage.cc > @@ -268,15 +268,19 @@ IniDBBuilderPackage::buildInstallSize (const std::string &size) > void > IniDBBuilderPackage::buildInstallSHA512 (unsigned char const *sha512) > { > - if (sha512) > + if (sha512 && cbpv.source()->sha512_isSet) { > memcpy (cbpv.source()->sha512sum, sha512, sizeof cbpv.source()->sha512sum); > + cbpv.source()->sha512_isSet = true; > + } This looks wrong. if (...&& cbpv.source()->sha512_isSet) ... cbpv.source()->sha512_isSet = true; If the flag is set you set it again? > } > > void > IniDBBuilderPackage::buildSourceSHA512 (unsigned char const *sha512) > { > - if (sha512) > + if (sha512 && cbpv.source()->sha512_isSet) { > memcpy (cspv.source()->sha512sum, sha512, sizeof cspv.source()->sha512sum); > + cbpv.source()->sha512_isSet = true; > + } > } Same here. Am I missing something? Thanks, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat
Attachment:
pgpcWYzINL828.pgp
Description: PGP signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |