rng-tools: update to 6.6.

This commit is contained in:
Andrea Brancaleoni 2018-11-02 00:30:40 +01:00
parent 26b40ed39d
commit 74d38c8332
2 changed files with 3 additions and 27 deletions

View file

@ -1,24 +0,0 @@
This patch from upstream (https://github.com/nhorman/rng-tools/commit/f12a80185a4bbf65fbc860f2d2e25af67c70ad6b)
will allow rngd to run. It can safely be deleted as soon as there is another upstream release.
Without this patch, rngd will die with a "smashed stack" on 64-bit machines that support the RDRAND instruction.
--- rngd_rdrand.c.orig 2018-09-25 19:54:05.000000000 +0200
+++ rngd_rdrand.c 2018-10-01 05:42:38.655982555 +0200
@@ -246,7 +246,14 @@
if (ent_src->rng_options[DRNG_OPT_AES].int_val)
return xread_drng_with_aes(buf, size, ent_src);
- x86_rdrand_bytes(buf, size);
+ /* NB: x86_rdrand_bytes might overrun end of buffer, if not a multiple of 8 */
+ if (size > 7)
+ x86_rdrand_bytes(buf, (size&~7));
+ if ((size&7) != 0) {
+ unsigned char tempbuf[8];
+ x86_rdrand_bytes(tempbuf, (size&7));
+ memcpy((unsigned char *)buf+(size&~7), tempbuf, (size&7));
+ }
return 0;
}

View file

@ -1,7 +1,7 @@
# Template file for 'rng-tools'
pkgname=rng-tools
version=6.5
revision=2
version=6.6
revision=1
wrksrc=${pkgname}-${version}
build_style=gnu-configure
makedepends="libgcrypt-devel libsysfs-devel libcurl-devel libxml2-devel"
@ -11,7 +11,7 @@ maintainer="Andrea Brancaleoni <abc@pompel.me>"
license="GPL-2.0-or-later"
homepage="https://github.com/nhorman/rng-tools/releases"
distfiles="https://github.com/nhorman/rng-tools/archive/v${version}.tar.gz"
checksum=5fecd904f7d01262b3209ff78dd3b9594aac8daa41badd5a1e6438658e80c36e
checksum=201d15e9e5ae8468b14a7a2f3a7fa714c4e83380f4468b80893148bf700c2efe
configure_args="--sbindir=/usr/bin"
case "$XBPS_TARGET_MACHINE" in